]> 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)
committerSasha Levin <alexander.levin@verizon.com>
Thu, 7 Dec 2017 02:20:14 +0000 (21:20 -0500)
commit5ad0509a3e6febe99b968aa8d8d90b8c0d216b72
tree48960d1cfeca06c5696e493d8e84438fc475b8d0
parent5a306396567a66856bdc8eb7048e4e3460d49424
USB: serial: garmin_gps: fix I/O after failed probe and remove

[ Upstream commit 19a565d9af6e0d828bd0d521d3bafd5017f4ce52 ]

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")
Cc: stable <stable@vger.kernel.org> # 51a2f077 ("USB: introduce usb_anchor")
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
drivers/usb/serial/garmin_gps.c