]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
USB: serial: garmin_gps: fix I/O after failed probe and remove
authorJohan Hovold <johan@kernel.org>
Wed, 11 Oct 2017 12:02:57 +0000 (14:02 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 Nov 2017 08:01:08 +0000 (09:01 +0100)
commit50cc5314001862bd08e025f54c71ecd5f8b211ce
tree401a7b2a1fabad9cba70ece0e02756f4d1b1d6dc
parentc0d6a6f83281a73ef8d60ab0e3ebdd134217c295
USB: serial: garmin_gps: fix I/O after failed probe and remove

commit 19a565d9af6e0d828bd0d521d3bafd5017f4ce52 upstream.

Make sure to stop any submitted interrupt and bulk-out URBs before
returning after failed probe and when the port is being unbound to avoid
later NULL-pointer dereferences in the completion callbacks.

Also fix up the related and broken I/O cancellation on failed open and
on close. (Note that port->write_urb was never submitted.)

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
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/garmin_gps.c