USB: mos7840: fix race in register handling
authorJohan Hovold <jhovold@gmail.com>
Fri, 26 Jul 2013 09:55:17 +0000 (11:55 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 10 Sep 2013 00:57:14 +0000 (01:57 +0100)
commit6380025aff7900370d4488ee4bfd95ac6c6491d5
tree4bfb29a1026cf2314c9b43356bc0bb1a03539b0b
parent6d047ebfeb1e96641e65cb9bf7de132fc565c01e
USB: mos7840: fix race in register handling

commit d8a083cc746664916d9d36ed9e4d08a29525f245 upstream.

Fix race in mos7840_get_reg which unconditionally manipulated the
control urb (which may already be in use) by adding a control-urb busy
flag.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/usb/serial/mos7840.c