]> git.baikalelectronics.ru Git - kernel.git/commit
wusbcore: fix kernel panic when disconnecting a wireless USB->serial device
authorThomas Pugliese <thomas.pugliese@gmail.com>
Fri, 9 Aug 2013 14:52:13 +0000 (09:52 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 Aug 2013 20:45:26 +0000 (13:45 -0700)
commitc07f15d1abf376007748be3c25c4ad6d19b7f5d9
tree5ad1b2fd376bc653943b95e182b612feb12b36c1
parentf33afb20c2fa6ffb7b0ba1c9760f9117537c8db4
wusbcore: fix kernel panic when disconnecting a wireless USB->serial device

This patch fixes a kernel panic that can occur when disconnecting a
wireless USB->serial device.  When the serial device disconnects, the
device cleanup procedure ends up calling usb_hcd_disable_endpoint on the
serial device's endpoints.  The wusbcore uses the ABORT_RPIPE command to
abort all transfers on the given endpoint but it does not properly give
back the URBs when the transfer results return from the HWA.  This patch
prevents the transfer result processing code from bailing out when it sees
a WA_XFER_STATUS_ABORTED result code so that these urbs are flushed
properly by usb_hcd_disable_endpoint.  It also updates wa_urb_dequeue to
handle the case where the endpoint has already been cleaned up when
usb_kill_urb is called which is where the panic originally occurred.

Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/wusbcore/wa-xfer.c