linux-sg2042/drivers/media
Laurent Pinchart bd994ddb2a [media] v4l: vb2: Fix stream start and buffer completion race
videobuf2 stores the driver streaming state internally in the queue in
the start_streaming_called variable. The state is set right after the
driver start_stream operation returns, and checked in the
vb2_buffer_done() function, typically called from the frame completion
interrupt handler. A race condition exists if the hardware finishes
processing the first frame before the start_stream operation returns.

Fix this by setting start_streaming_called to 1 before calling the
start_stream operation, and resetting it to 0 if the operation fails.

Cc: stable@vger.kernel.org      # for v3.15 and up
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-17 12:44:48 -03:00
..
common [media] media: remove the setting of the flag V4L2_FL_USE_FH_PRIO 2014-07-04 16:14:59 -03:00
dvb-core [media] cxusb: TechnoTrend CT2-4400 USB DVB-T2/C tuner support 2014-07-14 21:07:07 -03:00
dvb-frontends [media] si2168: few firmware download changes 2014-07-14 21:07:09 -03:00
firewire firewire: introduce fw_driver.probe and .remove methods 2013-06-09 18:15:00 +02:00
i2c [media] Fix 64-bit division fall-out from 64-bit control ranges 2014-07-17 12:44:38 -03:00
mmc [media] siano: get rid of CammelCase from smscoreapi.h 2013-03-21 10:03:16 -03:00
parport [media] v4l: Support extending the v4l2_pix_format structure 2014-07-17 12:44:47 -03:00
pci [media] v4l: Support extending the v4l2_pix_format structure 2014-07-17 12:44:47 -03:00
platform [media] v4l: Support extending the v4l2_pix_format structure 2014-07-17 12:44:47 -03:00
radio [media] Fix 64-bit division fall-out from 64-bit control ranges 2014-07-17 12:44:38 -03:00
rc [media] rc: add sunxi-ir driver 2014-07-04 14:53:43 -03:00
tuners [media] si2157: rework firmware download logic a little bit 2014-07-14 21:07:09 -03:00
usb [media] v4l: Support extending the v4l2_pix_format structure 2014-07-17 12:44:47 -03:00
v4l2-core [media] v4l: vb2: Fix stream start and buffer completion race 2014-07-17 12:44:48 -03:00
Kconfig [media] subdev autoselect only works if I2C and I2C_MUX is selected 2013-12-21 06:03:06 -02:00
Makefile [media] move i2c files into drivers/media/i2c 2012-09-06 18:42:54 -03:00
media-device.c Linux 3.15-rc6 2014-05-21 23:03:15 -03:00
media-devnode.c [media] media: Use a better owner for the media device 2014-05-13 13:39:00 -03:00
media-entity.c [media] media: Check for active links on pads with MEDIA_PAD_FL_MUST_CONNECT flag 2013-12-04 15:03:45 -02:00