]> git.baikalelectronics.ru Git - kernel.git/commit
[media] v4l: Fix use-after-free case in v4l2_device_release
authorHans Verkuil <hverkuil@xs4all.nl>
Tue, 6 Sep 2011 13:23:18 +0000 (10:23 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 22 Sep 2011 01:17:43 +0000 (22:17 -0300)
commitac1c35694a38e19830de9fa4adfd034f313f202e
tree774e688fe12b1cbbc2495f7a250fe4901d0bec6f
parent3062e2443cb28ca619ff00aa423a9ef90714bc8b
[media] v4l: Fix use-after-free case in v4l2_device_release

Drivers that have no v4l2_device release callback might free the
v4l2_device instance in the video_device release callback. Make sure we
don't access the v4l2_device instance after it gets freed.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/v4l2-dev.c