usb: musb: host: fix potential NULL pointer dereference
Subsystems (2)
PATCH 1/2 usb: musb: host: fix potential NULL pointer dereference
Quoted 5 lines · Greg Kroah-Hartman
Quoted 4 lines · Bin Liu
musb_start_urb()doesn't check the pass-in parameter if it is NULL. But inmusb_bulk_nak_timeout()the parameter passed tomusb_start_urb()is returned fromfirst_qh(), which could be NULL.
Quoted 7 lines
Quoted 4 lines
So wrap the
musb_start_urb()call here with a if condition check to avoid the potential NULL pointer dereference.Fixes f283862f3b5cb("usb: musb: NAK timeout scheme on bulk TX endpoint")Nit, you forgot a ' ', this should be:
f283862f3b5c("usb: musb: NAK timeout scheme on bulk TX endpoint")
Sorry, thanks.
Quoted 1 line
You also had one extra id value in there, odd. I'll edit this by
Not sure why 'git blame' gives that one extra on my computer. I will see if I will figure it out...
Quoted 1 line
hand...
Thanks,
-Bin.
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html