USB: serial: keyspan_pda: fix tx-unthrottle use-after-free
authorJohan Hovold <johan@kernel.org>
Sun, 25 Oct 2020 17:45:51 +0000 (18:45 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Dec 2020 10:54:12 +0000 (11:54 +0100)
commit28a9c268380afdfc650200949c8b94e8d54e3650
tree4bc08034715c6a1e2a6c38fd822a0044da99be69
parentdf2754ae5f0eb7d15d541d837b8e8725d3e56817
USB: serial: keyspan_pda: fix tx-unthrottle use-after-free

commit 49fbb8e37a961396a5b6c82937c70df91de45e9d upstream.

The driver's transmit-unthrottle work was never flushed on disconnect,
something which could lead to the driver port data being freed while the
unthrottle work is still scheduled.

Fix this by cancelling the unthrottle work when shutting down the port.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Cc: stable@vger.kernel.org
Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/keyspan_pda.c