From: Alan Stern <stern@rowland.harvard.edu>
To: Linyu Yuan <linyyuan@codeaurora.org>
Cc: Felipe Balbi <balbi@kernel.org>,
Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Jack Pham <jackp@codeaurora.org>
Subject: Re: [PATCH v2] usb: dwc3: avoid NULL access of usb_gadget_driver
Date: Tue, 29 Jun 2021 10:32:51 -0400 [thread overview]
Message-ID: <20210629143251.GA699290@rowland.harvard.edu> (raw)
In-Reply-To: <20210629015118.7944-1-linyyuan@codeaurora.org>
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 <linyyuan@codeaurora.org>
> ---
>
> v2: add missing check in dwc3_reset_gadget(), found by Alan Stern.
This is better.
Acked-by: Alan Stern <stern@rowland.harvard.edu>
prev parent reply other threads:[~2021-06-29 14:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-29 1:51 [PATCH v2] usb: dwc3: avoid NULL access of usb_gadget_driver Linyu Yuan
2021-06-29 14:32 ` Alan Stern [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210629143251.GA699290@rowland.harvard.edu \
--to=stern@rowland.harvard.edu \
--cc=Thinh.Nguyen@synopsys.com \
--cc=balbi@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jackp@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linyyuan@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).