linux/drivers/media/v4l2-core
Laurent Pinchart 69c0e9c547 [media] v4l: vb2: Fix race condition in _vb2_fop_release
The function releases the queue if the file being released is the queue
owner. The check reads the queue->owner field without taking the queue
lock, creating a race condition with functions that set the queue owner,
such as vb2_ioctl_reqbufs() for instance.

Fix this by moving the queue->owner check within the mutex protected
section.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2014-12-04 12:41:51 -02:00
..
Kconfig
Makefile
tuner-core.c
v4l2-async.c
v4l2-clk.c
v4l2-common.c
v4l2-compat-ioctl32.c
v4l2-ctrls.c
v4l2-dev.c
v4l2-device.c
v4l2-dv-timings.c
v4l2-event.c
v4l2-fh.c
v4l2-ioctl.c
v4l2-mem2mem.c
v4l2-of.c
v4l2-subdev.c
videobuf2-core.c
videobuf2-dma-contig.c
videobuf2-dma-sg.c
videobuf2-dvb.c
videobuf2-memops.c
videobuf2-vmalloc.c
videobuf-core.c
videobuf-dma-contig.c
videobuf-dma-sg.c
videobuf-dvb.c
videobuf-vmalloc.c