Messages in this thread Patch in this message | | | From | Hillf Danton <> | Subject | Re: [syzbot] [usb?] WARNING in wdm_rxwork/usb_submit_urb (2) | Date | Fri, 26 Apr 2024 06:55:01 +0800 |
| |
On Wed, 24 Apr 2024 21:40:22 -0700 > syzbot has found a reproducer for the following issue on: > > HEAD commit: a160e1202ca3 usb: dwc3: qcom: Add multiport suspend/resume.. > git tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=166f3d27180000
#syz test https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
--- x/drivers/usb/class/cdc-wdm.c +++ y/drivers/usb/class/cdc-wdm.c @@ -311,11 +311,12 @@ static void wdm_int_callback(struct urb && !test_bit(WDM_DISCONNECTING, &desc->flags) && !test_bit(WDM_SUSPENDING, &desc->flags)) { rv = usb_submit_urb(desc->response, GFP_ATOMIC); + if (rv) + clear_bit(WDM_RESPONDING, &desc->flags); dev_dbg(&desc->intf->dev, "submit response URB %d\n", rv); } spin_unlock_irqrestore(&desc->iuspin, flags); if (rv < 0) { - clear_bit(WDM_RESPONDING, &desc->flags); if (rv == -EPERM) return; if (rv == -ENOMEM) { --
| |