1
linux/drivers/media/video/gspca
Jean-François Moine 02bbcb9d86 V4L/DVB: gspca - main: Possible race condition in queue management
The problem may occur with SMP:
- a frame is completed at interrupt level (in gspca_frame_add with
  packet_type == LAST_PACKET,
- just after clearing the bit V4L2_BUF_FLAG_QUEUED and before setting
  the bit V4L2_BUF_FLAG_DONE, on the other processor, the application
  tries to requeue the same frame buffer,
- then, the qbuf function succeeds because ALL_FLAGS are not set.
The fix sets and resets the two flags in one instruction.

Reported-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-08-02 16:42:47 -03:00
..
gl860 V4L/DVB: gspca - gl860: Fix a compilation warning 2010-08-02 15:30:55 -03:00
m5602 V4L/DVB: gspca - main: Simplify image building 2010-08-02 15:31:10 -03:00
stv06xx V4L/DVB: gspca: Remove/move useless inclusions of slab.h 2010-08-02 14:49:20 -03:00
benq.c USB: rename usb_buffer_alloc() and usb_buffer_free() users 2010-05-20 13:21:38 -07:00
coarse_expo_autogain.h V4L/DVB: gscpa_sonixb: Differentiate between sensors with a coarse and fine expo ctrl 2010-02-26 15:11:08 -03:00
conex.c V4L/DVB: gspca - JPEG subdrivers: Don't allocate the JPEG header 2010-08-02 14:06:08 -03:00
cpia1.c V4L/DVB: gspca - main: Simplify image building 2010-08-02 15:31:10 -03:00
etoms.c
finepix.c
gspca.c V4L/DVB: gspca - main: Possible race condition in queue management 2010-08-02 16:42:47 -03:00
gspca.h V4L/DVB: gspca - main: Simplify image building 2010-08-02 15:31:10 -03:00
jeilinj.c V4L/DVB: gspca - JPEG subdrivers: Don't allocate the JPEG header 2010-08-02 14:06:08 -03:00
jpeg.h
Kconfig V4L/DVB: gspca - spca1528: New subdriver 2010-08-02 14:45:17 -03:00
Makefile V4L/DVB: gspca - spca1528: New subdriver 2010-08-02 14:45:17 -03:00
mars.c V4L/DVB: gspca - JPEG subdrivers: Don't allocate the JPEG header 2010-08-02 14:06:08 -03:00
mr97310a.c V4L/DVB: gspca_mr97310a: add support for the Sakar 1638x CyberPix 2010-02-26 15:11:09 -03:00
ov519.c V4L/DVB: gspca - main: Simplify image building 2010-08-02 15:31:10 -03:00
ov534_9.c
ov534.c V4L/DVB: gspca - main: Simplify image building 2010-08-02 15:31:10 -03:00
pac207.c V4L/DVB: gspca - pac207: Let all pac207 ctrls have a coherent naming 2010-05-18 00:46:28 -03:00
pac7302.c V4L/DVB: gspca - main: Simplify image building 2010-08-02 15:31:10 -03:00
pac7311.c V4L/DVB: gspca - main: Simplify image building 2010-08-02 15:31:10 -03:00
pac_common.h V4L/DVB: gspca_pac7302: much improved exposure control 2010-02-26 15:11:09 -03:00
sn9c20x.c V4L/DVB: gspca: Remove/move useless inclusions of slab.h 2010-08-02 14:49:20 -03:00
sn9c2028.c V4L/DVB: gspca - cpia1 / sn9c2028: Make control descriptors constant 2010-05-18 00:46:31 -03:00
sn9c2028.h
sonixb.c V4L/DVB: gspca - main: Simplify image building 2010-08-02 15:31:10 -03:00
sonixj.c V4L/DVB: gspca: Remove/move useless inclusions of slab.h 2010-08-02 14:49:20 -03:00
spca500.c V4L/DVB: gspca - JPEG subdrivers: Don't allocate the JPEG header 2010-08-02 14:06:08 -03:00
spca501.c
spca505.c
spca506.c
spca508.c V4L/DVB: gspca: make usb id 0461:0815 get handled by the right driver 2010-05-06 19:19:05 -03:00
spca561.c V4L/DVB: gspca_spca561: Add support for camera button 2010-05-18 00:50:11 -03:00
spca1528.c V4L/DVB: gspca - spca1528: New subdriver 2010-08-02 14:45:17 -03:00
sq905.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
sq905c.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
sq930x.c V4L/DVB: gspca - sq930x: New sensor mt9v111 2010-08-02 14:52:02 -03:00
stk014.c V4L/DVB: gspca - stk014: Change the min and default values of the JPEG quality 2010-08-02 14:06:09 -03:00
stv0680.c
sunplus.c V4L/DVB: gspca - JPEG subdrivers: Don't allocate the JPEG header 2010-08-02 14:06:08 -03:00
t613.c V4L/DVB: drivers/media/video/gspca: Use kmemdup 2010-08-02 15:01:43 -03:00
tv8532.c V4L/DVB: gspca_tv8532: rename brightness control to exposure 2010-08-02 14:06:06 -03:00
vc032x.c V4L/DVB: gspca - main: Simplify image building 2010-08-02 15:31:10 -03:00
w996Xcf.c V4L/DVB: gspca - JPEG subdrivers: Don't allocate the JPEG header 2010-08-02 14:06:08 -03:00
zc3xx-reg.h
zc3xx.c V4L/DVB: Remove obsolete zc0301 v4l driver 2010-08-02 15:27:16 -03:00