Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] omap3isp: ccdc: Fix crash in HS/VS interrupt handler

The HS/VS interrupt handler needs to access the pipeline object. It
erronously tries to get it from the CCDC output video node, which isn't
necessarily included in the pipeline. This leads to a NULL pointer
dereference.

Fix the bug by getting the pipeline object from the CCDC subdev entity.

Reported-by: Gary Thomas <gary@mlbassoc.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

authored by

Laurent Pinchart and committed by
Mauro Carvalho Chehab
bd0f2e6d ec0cae7a

+1 -2
+1 -2
drivers/media/video/omap3isp/ispccdc.c
··· 1406 1406 1407 1407 static void ccdc_hs_vs_isr(struct isp_ccdc_device *ccdc) 1408 1408 { 1409 - struct isp_pipeline *pipe = 1410 - to_isp_pipeline(&ccdc->video_out.video.entity); 1409 + struct isp_pipeline *pipe = to_isp_pipeline(&ccdc->subdev.entity); 1411 1410 struct video_device *vdev = &ccdc->subdev.devnode; 1412 1411 struct v4l2_event event; 1413 1412