All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: David Cohen <david.a.cohen@linux.intel.com>
Cc: Alan Stern <stern@rowland.harvard.edu>,
	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: Fri, 21 Feb 2014 15:29:34 +0200	[thread overview]
Message-ID: <530754BE.5090301@linux.intel.com> (raw)
In-Reply-To: <20140108195334.GB27907@psi-dev26.jf.intel.com>

On 01/08/2014 09:53 PM, David Cohen wrote:
> 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.
>

Could you check if this patch works for you?:

http://marc.info/?l=linux-usb&m=139298822514995&w=2

I'm not able to reproduce the original issue myself

-Mathias

  reply	other threads:[~2014-02-21 13:20 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
2014-02-21 13:29       ` Mathias Nyman [this message]
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=530754BE.5090301@linux.intel.com \
    --to=mathias.nyman@linux.intel.com \
    --cc=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.