usb: gadget: u_serial: add missing port entry locking
authorMichał Mirosław <mirq-linux@rere.qmqm.pl>
Sat, 10 Aug 2019 08:42:48 +0000 (10:42 +0200)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 22 Oct 2019 07:27:04 +0000 (10:27 +0300)
commitdaf82bd24e308c5a83758047aff1bd81edda4f11
tree8be1a009f2bfaf549761aac2814bf11484e5aa79
parent9ba3aca8fe82318805709036bd50bee64570088b
usb: gadget: u_serial: add missing port entry locking

gserial_alloc_line() misses locking (for a release barrier) while
resetting port entry on TTY allocation failure. Fix this.

Cc: stable@vger.kernel.org
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tested-by: Ladislav Michl <ladis@linux-mips.org>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/gadget/function/u_serial.c