[lkml]   [2021]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v2] usb: dwc3: avoid NULL access of usb_gadget_driver
On Tue, Jun 29, 2021 at 09:51:18AM +0800, Linyu Yuan wrote:
> we found crash in dwc3_disconnect_gadget(),
> it is because dwc->gadget_driver become NULL before async access.
> 7dc0c55e9f30 ('USB: UDC core: Add udc_async_callbacks gadget op')
> suggest a common way to avoid such kind of issue.
> this change implment the callback in dwc3 and
> change related functions which have callback to usb gadget driver.
> Signed-off-by: Linyu Yuan <>
> ---
> v2: add missing check in dwc3_reset_gadget(), found by Alan Stern.

This is better.

Acked-by: Alan Stern <>

 \ /
  Last update: 2021-06-29 16:33    [W:1.337 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site