linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@kernel.org>
To: Peter Chen <peter.chen@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jack Pham <jackp@codeaurora.org>, linux-usb@vger.kernel.org
Subject: Re: [PATCH 1/1] usb: dwc3: core: fix kernel panic when do reboot
Date: Fri, 11 Jun 2021 16:23:58 +0300	[thread overview]
Message-ID: <87lf7gzg9d.fsf@kernel.org> (raw)
In-Reply-To: <20210610135822.GA7839@Peter>

[-- Attachment #1: Type: text/plain, Size: 1954 bytes --]

Peter Chen <peter.chen@kernel.org> writes:

> On 21-06-10 08:36:57, Greg Kroah-Hartman wrote:
>> On Thu, Jun 10, 2021 at 10:00:47AM +0800, Peter Chen wrote:
>> > On 21-06-09 11:42:53, Greg Kroah-Hartman wrote:
>> > > On Wed, Jun 09, 2021 at 11:01:07AM +0200, Greg Kroah-Hartman wrote:
>> > > > On Tue, Jun 08, 2021 at 09:50:01AM -0700, Jack Pham wrote:
>> > > > > Hi Peter,
>> > > > > 
>> > > > > On Tue, Jun 08, 2021 at 06:56:56PM +0800, Peter Chen wrote:
>> > > > > > When do system reboot, it calls dwc3_shutdown and the whole debugfs
>> > > > > > for dwc3 has removed first, when the gadget tries to do deinit, and
>> > > > > > remove debugfs for its endpoints, it meets NULL pointer dereference
>> > > > > > issue when call debugfs_lookup. Fix it by removing the whole dwc3
>> > > > > > debugfs later than dwc3_drd_exit.
>> > > > > 
>> > > > > Ouch, thanks for catching this! I think in your previous reply[1] you
>> > > > > did warn about the debugfs_remove_recursive() getting called twice, but
>> > > > > it seems here the issue is due to the debugfs_lookup() getting called on
>> > > > > a stale dwc->root pointer after it was already removed.
>> > > > 
>> > > > We can also fix this by getting rid of that "root" pointer as it's
>> > > > useless (we can look it up if we need it.)  I'll send a patch later to
>> > > > do that, as it's a good idea to do anyway, and is independant of this
>> > > > fix.
>> > > 
>> > > Now sent:
>> > > 	https://lore.kernel.org/r/20210609093924.3293230-1-gregkh@linuxfoundation.org
>> > 
>> > Hi Felipe,
>> > 
>> > With Greg above patch, this issue is fixed indirectly. I don't think my patch is
>> > needed, do you think so?
>> 
>> Which patch is "your patch" here?
>> 
>
> The patch in this thread.

This one, Greg:
https://lore.kernel.org/r/20210609093924.3293230-1-gregkh@linuxfoundation.org

Now that we have that, I don't think $subject is required.

-- 
balbi

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 511 bytes --]

  reply	other threads:[~2021-06-11 13:24 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-08 10:56 [PATCH 1/1] usb: dwc3: core: fix kernel panic when do reboot Peter Chen
2021-06-08 13:37 ` Andy Shevchenko
2021-06-08 16:50 ` Jack Pham
2021-06-09  9:01   ` Greg Kroah-Hartman
2021-06-09  9:42     ` Greg Kroah-Hartman
2021-06-10  2:00       ` Peter Chen
2021-06-10  6:36         ` Greg Kroah-Hartman
2021-06-10 13:58           ` Peter Chen
2021-06-11 13:23             ` Felipe Balbi [this message]
2021-06-11 13:30               ` Greg Kroah-Hartman

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=87lf7gzg9d.fsf@kernel.org \
    --to=balbi@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jackp@codeaurora.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=peter.chen@kernel.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).