USB: serial: grab disconnect mutex in chars_in_buffer
authorJohan Hovold <jhovold@gmail.com>
Mon, 14 Jan 2013 15:52:56 +0000 (16:52 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Jan 2013 23:45:17 +0000 (15:45 -0800)
commit810360a03597afc0d43a45798a52cfb69b8453d3
tree977253346afd738d334a73de671cbd9f2102d809
parentfcdb6a21903bcab0b5f788ba7eb0c31dd06040fd
USB: serial: grab disconnect mutex in chars_in_buffer

Grab disconnect mutex in chars_in_buffer before checking disconnected
flag or calling driver specific function.

This allows subdrivers to query any hardware buffer status without
having to handle the locking themselves.

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