提交 c415187b 编写于 作者: T Tushar Behera 提交者: Tomi Valkeinen

OMAPFB: Fix possible null pointer dereferencing

Commit 952cbaaa (OMAPFB: Change
dssdev->manager references) added checks for OMAPFB_WAITFORVSYNC ioctl
to verify that the display, output and overlay manager exist. However,
the code erroneously uses && for each part, which means that
OMAPFB_WAITFORVSYNC may crash the kernel if no display, output or
manager is associated with the framebuffer.

This patch fixes the issue by using ||.
Signed-off-by: NTushar Behera <tushar.behera@linaro.org>
Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
上级 dffc70ad
......@@ -787,7 +787,7 @@ int omapfb_ioctl(struct fb_info *fbi, unsigned int cmd, unsigned long arg)
case OMAPFB_WAITFORVSYNC:
DBG("ioctl WAITFORVSYNC\n");
if (!display && !display->output && !display->output->manager) {
if (!display || !display->output || !display->output->manager) {
r = -EINVAL;
break;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册