]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
USB: serial: keyspan_pda: fix write-wakeup use-after-free
authorJohan Hovold <johan@kernel.org>
Sun, 25 Oct 2020 17:45:50 +0000 (18:45 +0100)
committerJohan Hovold <johan@kernel.org>
Wed, 4 Nov 2020 10:01:16 +0000 (11:01 +0100)
commit37faf50615412947868c49aee62f68233307f4e4
tree847674ce0c0ec9a235a0b121b3efe898e10f9c05
parentc01d2c58698f710c9e13ba3e2d296328606f74fd
USB: serial: keyspan_pda: fix write-wakeup use-after-free

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

Fix this by using the usb-serial write wakeup which gets cancelled
properly on disconnect.

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>
drivers/usb/serial/keyspan_pda.c