usb: wusbcore: avoid stack overflow in URB enqueue error path
authorThomas Pugliese <thomas.pugliese@gmail.com>
Tue, 1 Oct 2013 15:14:56 +0000 (10:14 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Oct 2013 22:46:26 +0000 (15:46 -0700)
commit33186c441684de348636f94412d2fc256e641113
treedf8348447bd8abb82f60fc564ed78809d5f8fe10
parent02c123ee99c793f65af2dbda17d5fe87d448f808
usb: wusbcore: avoid stack overflow in URB enqueue error path

This patch modifies wa_urb_enqueue to return an error and not call the
urb completion routine if it failed to enqueue the urb because the HWA
device is gone.  This prevents a stack overflow due to infinite
submit/complete recursion when unplugging the HWA while connected to a
HID device.

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