From: David Cohen <david.a.cohen@linux.intel.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Greg KH <gregkh@linuxfoundation.org>,
sarah.a.sharp@linux.intel.com, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org, jianqian <jianqiang.tang@intel.com>
Subject: Re: [RFC/PATCH] usb/xhci: avoid kernel panic on xhci_suspend()
Date: Wed, 8 Jan 2014 11:53:34 -0800 [thread overview]
Message-ID: <20140108195334.GB27907@psi-dev26.jf.intel.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1401081046300.1659-100000@iolanthe.rowland.org>
On Wed, Jan 08, 2014 at 10:48:06AM -0500, Alan Stern wrote:
> On Tue, 7 Jan 2014, Greg KH wrote:
>
> > On Tue, Jan 07, 2014 at 05:44:26PM -0800, David Cohen wrote:
> > > From: jianqian <jianqiang.tang@intel.com>
> > >
> > > There is a possible kernel panic faced on xhci_suspend().
> > > Due to kernel modified the hub autosupend_delay to 0s, after usb1 root
> > > hub finishes initialization, it will trigger runtime_suspend and then
> > > it will trigger xhci runtime suspend. But at that time, if
> > > xhci->shared_hcd is still doing initialization, it is possible to face
> > > null pointer kernel panic in xhci_suspend() function.
> > >
> > > This patch checks if xhci->shared_hcd is null to avoid panic.
> >
> > That sounds like this is a race that should be fixed properly, not just
> > papered over, right?
>
> That was my reaction too. The best way to solve the problem is to
> prevent the USB-2 root hub from suspending until after the USB-3 root
> hub has been registered.
That makes sense. Thanks for the feedback.
I'll check for a new approach.
Br, David Cohen
>
> Alan Stern
next prev parent reply other threads:[~2014-01-08 19:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-08 1:44 [RFC/PATCH] usb/xhci: avoid kernel panic on xhci_suspend() David Cohen
2014-01-08 1:45 ` Greg KH
2014-01-08 15:48 ` Alan Stern
2014-01-08 19:53 ` David Cohen [this message]
2014-02-21 13:29 ` Mathias Nyman
2014-01-08 1:46 ` Greg KH
2014-01-08 3:49 ` Tang, Jianqiang
2014-01-08 4:16 ` Greg KH
2014-01-08 5:45 ` David Cohen
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=20140108195334.GB27907@psi-dev26.jf.intel.com \
--to=david.a.cohen@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=jianqiang.tang@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=sarah.a.sharp@linux.intel.com \
--cc=stern@rowland.harvard.edu \
/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