linux/drivers/media/video/au0828
Devin Heitmueller 77fc286328 [media] au0828: fix possible race condition in usage of dev->ctrlmsg
The register read function is referencing the dev->ctrlmsg structure outside
of the dev->mutex lock, which can cause corruption of the value if multiple
callers are invoking au0828_readreg() simultaneously.

Use a stack variable to hold the result, and copy the buffer returned by
usb_control_msg() to that variable.

In reality, the whole recv_control_msg() function can probably be collapsed
into au0288_readreg() since it is the only caller.

Also get rid of cmd_msg_dump() since the only case in which the function is
ever called only is ever passed a single byte for the response (and it is
already logged).

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-11 12:37:55 -03:00
..
Kconfig [media] au8522: build ATV/DTV demodulators as separate modules 2012-04-19 09:49:06 -03:00
Makefile [media] drivers/media: do not use EXTRA_CFLAGS 2011-09-03 18:50:59 -03:00
au0828-cards.c [media] au0828: tweak workaround for i2c clock stretching bug 2012-08-09 20:57:39 -03:00
au0828-cards.h V4L/DVB (8805): Steven Toth email address change 2008-09-03 18:37:21 -03:00
au0828-core.c [media] au0828: fix possible race condition in usage of dev->ctrlmsg 2012-08-11 12:37:55 -03:00
au0828-dvb.c [media] au8522: properly recover from the au8522 delivering misaligned TS streams 2012-08-09 20:31:30 -03:00
au0828-i2c.c [media] au0828: make xc5000 firmware speedup apply to the xc5000c as well 2012-08-09 20:58:57 -03:00
au0828-reg.h [media] au0828: tweak workaround for i2c clock stretching bug 2012-08-09 20:57:39 -03:00
au0828-vbi.c V4L/DVB: Add closed captioning support for the HVR-950q 2010-08-02 14:48:53 -03:00
au0828-video.c [media] au0828: fix a couple of missed edge cases for i2c gate with analog 2012-08-09 20:58:31 -03:00
au0828.h [media] au0828: make sure video standard is setup in tuner-core 2012-08-09 20:35:26 -03:00