USB: serial: ti_usb_3410_5052: fix port-close races
authorJohan Hovold <johan@kernel.org>
Fri, 11 Oct 2019 09:57:35 +0000 (11:57 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Oct 2019 08:15:16 +0000 (09:15 +0100)
commitafa3bc254e0f054865f8b18d298f273e00c39849
tree82565d8f32d7cdf5c77201cea3e7626708d7d8ae
parentf0b1f7e0c8a7da3db9122c8368bbe34c7e8763c7
USB: serial: ti_usb_3410_5052: fix port-close races

commit 6f1d1dc8d540a9aa6e39b9cb86d3a67bbc1c8d8d upstream.

Fix races between closing a port and opening or closing another port on
the same device which could lead to a failure to start or stop the
shared interrupt URB. The latter could potentially cause a
use-after-free or worse in the completion handler on driver unbind.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/ti_usb_3410_5052.c