summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorDevin Heitmueller <dheitmueller@kernellabs.com>2012-08-07 05:47:07 +0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-08-11 19:37:55 +0400
commit77fc286328e6fd9a80ef8ce6963db7fbf4e07a1a (patch)
treeb7b320eadf82fd8649790a2791f37a1273661307 /firmware
parent1240ad56edfdd9ccc70d9cbce6da7d5d939d5e83 (diff)
downloadlinux-77fc286328e6fd9a80ef8ce6963db7fbf4e07a1a.tar.xz
[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>
Diffstat (limited to 'firmware')
0 files changed, 0 insertions, 0 deletions