mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sarah Sharp <sarah.a.sharp@linux.intel.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Maarten Lankhorst <m.b.lankhorst@gmail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	USB list <linux-usb@vger.kernel.org>
Subject: Re: inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage with hcd_urb_list_lock
Date: Thu, 11 Jul 2013 09:30:50 -0700	[thread overview]
Message-ID: <20130711163050.GB5240@xanatos> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1307061646560.29104-100000@netrider.rowland.org>

On Sat, Jul 06, 2013 at 04:48:47PM -0400, Alan Stern wrote:
> On Sat, 6 Jul 2013, Maarten Lankhorst wrote:
> 
> > I didn't even know I still had lockdep on.
> > The following lockdep splat happened when I plugged in a usb bluetooth dongle, using 
> > the pre-rc1 3.11 kernel at HEAD b2c311075db
> > 
> > =================================
> > [ INFO: inconsistent lock state ]
> > 3.10.0+ #106 Not tainted
> > ---------------------------------
> > inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage.
> > irq/42-xhci_hcd/97 [HC0[0]:SC0[2]:HE1:SE0] takes:
> >  (hcd_urb_list_lock){?.....}, at: [<ffffffff8149440e>] usb_hcd_unlink_urb_from_ep+0x28/0x4e
> 
> > stack backtrace:
> > CPU: 1 PID: 97 Comm: irq/42-xhci_hcd Not tainted 3.10.0+ #106
> > Hardware name: Acer Aspire M3985/Aspire M3985, BIOS P01-A1 03/12/2012
> >  ffffffff8210c150 ffff88040834da48 ffffffff81691af4 0000000000000007
> >  ffff8804082e20b0 ffff88040834daa8 ffffffff8168cb10 0000000000000002
> >  ffff880400000001 ffff880400000000 ffffffff8100f4f7 ffff88040834dac4
> > Call Trace:
> >  [<ffffffff81691af4>] dump_stack+0x4f/0x84
> >  [<ffffffff8168cb10>] print_usage_bug+0x1f5/0x206
> >  [<ffffffff8100f4f7>] ? save_stack_trace+0x2f/0x50
> >  [<ffffffff810af30c>] mark_lock+0x276/0x2cf
> >  [<ffffffff810ae8cc>] ? check_usage_forwards+0x12f/0x12f
> >  [<ffffffff810af925>] __lock_acquire+0x5c0/0x1c2e
> >  [<ffffffff810b1e04>] ? mark_held_locks+0x6d/0x117
> >  [<ffffffff8168e8d4>] ? __slab_free+0x1c7/0x2ed
> >  [<ffffffff810b1f5a>] ? trace_hardirqs_on_caller+0xac/0x1bb
> >  [<ffffffff810b2076>] ? trace_hardirqs_on+0xd/0xf
> >  [<ffffffff8149440e>] ? usb_hcd_unlink_urb_from_ep+0x28/0x4e
> >  [<ffffffff810b1556>] lock_acquire+0x87/0x139
> >  [<ffffffff8149440e>] ? usb_hcd_unlink_urb_from_ep+0x28/0x4e
> >  [<ffffffff81698a1a>] _raw_spin_lock+0x3b/0x4a
> >  [<ffffffff8149440e>] ? usb_hcd_unlink_urb_from_ep+0x28/0x4e
> >  [<ffffffff8149440e>] usb_hcd_unlink_urb_from_ep+0x28/0x4e
> >  [<ffffffff814bf55a>] xhci_irq+0x5ac/0x143d
> >  [<ffffffff81699171>] ? _raw_spin_unlock_irq+0x3b/0x5d
> >  [<ffffffff8108386d>] ? finish_task_switch+0x7c/0x101
> >  [<ffffffff81083830>] ? finish_task_switch+0x3f/0x101
> >  [<ffffffff81697060>] ? __schedule+0x42a/0x885
> >  [<ffffffff810d7fdb>] ? irq_thread_fn+0x48/0x48
> >  [<ffffffff814c03fc>] xhci_msi_irq+0x11/0x15
> 
> It looks like xhci_msi_irq() needs to call local_irq_save() and 
> local_irq_restore().

Alan, does this only need to be called when MSI is enabled?
xhci_msi_irq() basically calls xhci_irq, which is called if MSI is
disabled and legacy PCI interrupts are used.

I'm trying to figure out whether to put the calls to local_irq_save()
and local_irq_restore() in xhci_msi_irq() or xhci_irq().

Sarah Sharp

  parent reply	other threads:[~2013-07-11 16:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-06 18:03 Maarten Lankhorst
2013-07-06 20:48 ` Alan Stern
2013-07-07  9:32   ` Ming Lei
2013-07-11 16:30   ` Sarah Sharp [this message]
2013-07-11 16:58     ` Alan Stern

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=20130711163050.GB5240@xanatos \
    --to=sarah.a.sharp@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=m.b.lankhorst@gmail.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

all inboxes | Powered by JetHome®