usbip: vhci_hcd: fix calling usb_hcd_giveback_urb() with irqs enabled
authorShuah Khan <skhan@linuxfoundation.org>
Tue, 6 Oct 2020 22:39:14 +0000 (16:39 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 7 Oct 2020 07:25:48 +0000 (09:25 +0200)
commit9e8586827a7061fdb183e6571fac63af378be013
tree19e5f532b74b2be75a5d1114267f28ec59414469
parenta4f88430af896bf34ec25a7a5f0e053fb3d928e0
usbip: vhci_hcd: fix calling usb_hcd_giveback_urb() with irqs enabled

kcov testing uncovered call to usb_hcd_giveback_urb() without disabling
interrupts.

Link: https://lore.kernel.org/linux-usb/CAAeHK+wb4k-LGTjK9F5YbJNviF_+yU+wE_=Vpo9Rn7KFN8vG6Q@mail.gmail.com/
usb_hcd_giveback_urb() is called from vhci's urb_enqueue, when it
determines it doesn't need to xmit the urb and can give it back.
This path runs in task context.

Disable irqs around usb_hcd_giveback_urb() call.

Reported-by: Andrey Konovalov <andreyknvl@google.com>
Suggested-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Link: https://lore.kernel.org/r/20201006223914.39257-1-skhan@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/usbip/vhci_hcd.c