]> git.baikalelectronics.ru Git - kernel.git/commit
usbip: give back URBs for unsent unlink requests during cleanup
authorAnirudh Rayabharam <mail@anirudhrb.com>
Fri, 20 Aug 2021 19:01:21 +0000 (00:31 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Aug 2021 11:29:10 +0000 (13:29 +0200)
commit258c81b341c8025d79073ce2d6ce19dcdc7d10d2
tree0bbf67da2168d8d8ec8d50640675c050eb55b7f5
parent5786b433f721059f65b55a5ed0520ff5c375697d
usbip: give back URBs for unsent unlink requests during cleanup

In vhci_device_unlink_cleanup(), the URBs for unsent unlink requests are
not given back. This sometimes causes usb_kill_urb to wait indefinitely
for that urb to be given back. syzbot has reported a hung task issue [1]
for this.

To fix this, give back the urbs corresponding to unsent unlink requests
(unlink_tx list) similar to how urbs corresponding to unanswered unlink
requests (unlink_rx list) are given back.

[1]: https://syzkaller.appspot.com/bug?id=08f12df95ae7da69814e64eb5515d5a85ed06b76

Reported-by: syzbot+74d6ef051d3d2eacf428@syzkaller.appspotmail.com
Tested-by: syzbot+74d6ef051d3d2eacf428@syzkaller.appspotmail.com
Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Anirudh Rayabharam <mail@anirudhrb.com>
Link: https://lore.kernel.org/r/20210820190122.16379-2-mail@anirudhrb.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/usbip/vhci_hcd.c