mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
USB: serial: keyspan_pda: fix tx-unthrottle use-after-free
commit49fbb8e37aupstream. 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:1da177e4c3("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
df2754ae5f
commit
28a9c26838
@@ -647,8 +647,12 @@ error:
|
||||
}
|
||||
static void keyspan_pda_close(struct usb_serial_port *port)
|
||||
{
|
||||
struct keyspan_pda_private *priv = usb_get_serial_port_data(port);
|
||||
|
||||
usb_kill_urb(port->write_urb);
|
||||
usb_kill_urb(port->interrupt_in_urb);
|
||||
|
||||
cancel_work_sync(&priv->unthrottle_work);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user