diff mbox series

回复: KASAN: use-after-free Read in usb_anchor_resume_wakeups (2)

Message ID BYAPR11MB2632ECB99A1996D42958ADE5FFAA0@BYAPR11MB2632.namprd11.prod.outlook.com (mailing list archive)
State Superseded
Headers show
Series 回复: KASAN: use-after-free Read in usb_anchor_resume_wakeups (2) | expand

Commit Message

Zhang, Qiang Jan. 12, 2021, 3:28 a.m. UTC

diff mbox series

Patch

diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index 0687f0ed60b8..4233686d458d 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -1130,7 +1130,8 @@  static void xpad_stop_output(struct usb_xpad *xpad)
                        dev_warn(&xpad->intf->dev,
                                 "timed out waiting for output URB to complete, killing\n");
                        usb_kill_anchored_urbs(&xpad->irq_out_anchor);
-               }
+               } else
+                       usb_kill_urb(xpad->irq_out);
        }
 }