From: Greg KH <gregkh@suse.de>
To: Stefan Becker <Stefan.Becker@nokia.com>
Cc: ext Alan Stern <stern@rowland.harvard.edu>,
linux-usb@vger.kernel.org,
ext David Brownell <david-b@pacbell.net>,
linux-kernel@vger.kernel.org,
Linus Torvalds <torvalds@linux-foundation.org>,
ext Leonardo Chiquitto <leonardo.lists@gmail.com>
Subject: Re: [PATCH] USB: fix interrupt disabling for HCDs with shared interrupt handlers
Date: Tue, 1 Jul 2008 11:25:43 -0700 [thread overview]
Message-ID: <20080701182543.GA32098@suse.de> (raw)
In-Reply-To: <486A590A.4090806@nokia.com>
On Tue, Jul 01, 2008 at 07:19:22PM +0300, Stefan Becker wrote:
> Hi Alan & Greg,
>
> third time is the charm (I hope)...
>
> ext Alan Stern wrote:
>> flags must be unsigned long. You don't have to initialize it to 0.
>
> *Sigh* there are certain things you just shouldn't do when burning the
> midnight oil. I changed the patch according to your suggestions and also
> copied the comment for usb_hcd_irq() from David's changes.
>
> I hope this can still make it into 2.6.26, because it seems to solve a lot
> of problems for the users out there...
Hm, isn't this also an issue in 2.6.25 as well? I've had a few very
strange reports of USB just locking up in 2.6.25, could this also be the
cause there?
thanks,
greg k-h
> commit 89fa7659cb90f621513d7193b06cf19386451c33
> Author: Stefan Becker <stefan.becker@nokia.com>
> Date: Mon Jun 30 21:18:29 2008 +0300
>
> USB: fix interrupt disabling for HCDs with shared interrupt handlers
> As has been discussed several times on LKML, IRQF_SHARED |
> IRQF_DISABLED
> doesn't work reliably, i.e. a shared interrupt handler CAN'T be certain
> to
> be called with interrupts disabled. Most USB HCD handlers use
> IRQF_DISABLED
> and therefore havoc can break out if they share their interrupt with a
> handler that doesn't use it.
> On my test machine the yenta_socket interrupt handler (no
> IRQF_DISABLED)
> was registered before ehci_hcd and one uhci_hcd instance. Therefore all
> usb_hcd_irq() invocations for ehci_hcd and for one uhci_hcd instance
> happened with interrupts enabled. That led to random lockups as USB core
> HCD functions that acquire the same spinlock could be called twice
> from interrupt handlers.
> This patch updates usb_hcd_irq() to always disable/restore
> interrupts.
> usb_add_hcd() will silently remove any IRQF_DISABLED requested from HCD
> code.
> Signed-off-by: Stefan Becker <stefan.becker@nokia.com>
Alan and Dave, do you both ack this thing? I know you've been involved
in creating it, just want to get the formal approval :)
thanks,
greg k-h
next prev parent reply other threads:[~2008-07-01 18:27 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-22 16:55 [REGRESSION] 2.6.24/25: random lockups when accessing external USB harddrive Stefan Becker
2008-06-22 17:42 ` Rene Herman
2008-06-22 19:31 ` Alan Stern
2008-06-23 15:52 ` Stefan Becker
2008-06-23 18:10 ` Alan Stern
2008-06-24 18:41 ` Stefan Becker
2008-06-24 21:15 ` Alan Stern
2008-06-25 15:52 ` Stefan Becker
2008-06-25 18:38 ` Alan Stern
2008-06-26 6:31 ` Stefan Becker
2008-06-26 14:25 ` Alan Stern
2008-06-26 22:07 ` Stefan Becker
2008-06-27 16:07 ` David Brownell
2008-06-28 14:31 ` Stefan Becker
2008-06-27 16:10 ` Alan Stern
2008-06-28 14:36 ` Stefan Becker
2008-06-28 15:39 ` Stefan Becker
2008-06-28 16:53 ` Alan Stern
2008-06-28 19:34 ` BUG in 2.6.26-rc8 interrupt handling Becker Stefan (Nokia-D/Salo)
2008-06-28 19:51 ` David Brownell
2008-06-29 14:57 ` PATCH: 2.6.26-rc8: Fix IRQF_DISABLED for shared interrupts Stefan Becker
2008-06-30 3:09 ` David Brownell
2008-06-30 5:22 ` Stefan Becker
2008-06-30 14:28 ` Henrique de Moraes Holschuh
2008-06-30 14:26 ` Alan Cox
2008-06-30 9:34 ` Stefan Becker
2008-06-30 11:15 ` David Brownell
2008-06-30 14:37 ` Alan Stern
2008-06-30 18:53 ` [PATCH] USB: fix interrupt disabling for HCDs with shared interrupt handlers Stefan Becker
2008-06-30 19:35 ` Alan Stern
2008-06-30 20:31 ` David Brownell
2008-06-30 21:26 ` Stefan Becker
2008-07-01 14:11 ` Alan Stern
2008-07-01 14:19 ` Leonardo Chiquitto
2008-07-01 16:19 ` Stefan Becker
2008-07-01 18:25 ` Greg KH [this message]
2008-07-01 18:59 ` Alan Stern
2008-07-01 19:13 ` Greg KH
2008-07-01 19:21 ` David Brownell
2008-07-01 19:15 ` Stefan Becker
2008-07-01 19:51 ` Greg KH
2008-07-01 16:22 ` David Brownell
2008-06-30 21:29 ` Alan Stern
2008-06-30 21:48 ` David Brownell
2008-06-30 19:57 ` PATCH: 2.6.26-rc8: Fix IRQF_DISABLED for shared interrupts David Brownell
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=20080701182543.GA32098@suse.de \
--to=gregkh@suse.de \
--cc=Stefan.Becker@nokia.com \
--cc=david-b@pacbell.net \
--cc=leonardo.lists@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
--cc=torvalds@linux-foundation.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