]> git.baikalelectronics.ru Git - kernel.git/commit
USB: mos7840: fix race in led handling
authorJohan Hovold <jhovold@gmail.com>
Fri, 26 Jul 2013 09:55:19 +0000 (11:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Jul 2013 21:14:09 +0000 (14:14 -0700)
commitb465d06496685a8f45dd1679c6a6cd7d4436f5d4
tree83abe5bd4e48655518d3f6d3d9614c41be2ebe94
parent0e6c35463a2072f2f0715d08468941f7a633b15a
USB: mos7840: fix race in led handling

Fix race in LED handling introduced by commit 7b7b0d96 ("USB: serial:
mos7840: add support for MCS7810 devices") which reused the port control
urb for manipulating the LED without making sure that the urb is not
already in use. This could lead to the control urb being manipulated
while in flight.

Fix by adding a dedicated LED urb and ctrlrequest along with a LED-busy
flag to handle concurrency.

Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/mos7840.c