| From | Sent On | Attachments |
|---|---|---|
| Stefan Becker | Jun 22, 2008 9:55 am | |
| Rene Herman | Jun 22, 2008 10:42 am | |
| Alan Stern | Jun 22, 2008 12:31 pm | |
| Stefan Becker | Jun 23, 2008 8:52 am | |
| Alan Stern | Jun 23, 2008 11:09 am | |
| Stefan Becker | Jun 24, 2008 11:41 am | |
| Alan Stern | Jun 24, 2008 2:15 pm | |
| Stefan Becker | Jun 25, 2008 8:51 am | |
| Alan Stern | Jun 25, 2008 11:38 am | |
| Stefan Becker | Jun 25, 2008 11:31 pm | |
| Alan Stern | Jun 26, 2008 7:25 am | |
| Stefan Becker | Jun 26, 2008 3:07 pm | .bz2 |
| David Brownell | Jun 27, 2008 9:07 am | |
| Alan Stern | Jun 27, 2008 9:09 am | |
| Stefan Becker | Jun 28, 2008 7:31 am | |
| Stefan Becker | Jun 28, 2008 7:36 am | .bz2 |
| Stefan Becker | Jun 28, 2008 8:38 am | .bz2 |
| Alan Stern | Jun 28, 2008 9:52 am | |
| Becker Stefan (Nokia-D/Salo) | Jun 28, 2008 12:34 pm | |
| David Brownell | Jun 28, 2008 12:50 pm | |
| Stefan Becker | Jun 29, 2008 7:57 am | |
| David Brownell | Jun 29, 2008 8:09 pm | |
| Stefan Becker | Jun 29, 2008 10:22 pm | |
| Stefan Becker | Jun 30, 2008 2:34 am | |
| David Brownell | Jun 30, 2008 4:14 am | |
| Alan Cox | Jun 30, 2008 7:26 am | |
| Henrique de Moraes Holschuh | Jun 30, 2008 7:27 am | |
| Alan Stern | Jun 30, 2008 7:37 am | |
| Stefan Becker | Jun 30, 2008 11:52 am | |
| Alan Stern | Jun 30, 2008 12:35 pm | |
| David Brownell | Jun 30, 2008 12:57 pm | |
| David Brownell | Jun 30, 2008 1:30 pm | |
| Stefan Becker | Jun 30, 2008 2:26 pm | |
| Alan Stern | Jun 30, 2008 2:28 pm | |
| David Brownell | Jun 30, 2008 2:48 pm | |
| Alan Stern | Jul 1, 2008 7:10 am | |
| Leonardo Chiquitto | Jul 1, 2008 7:19 am | |
| Stefan Becker | Jul 1, 2008 9:18 am | |
| David Brownell | Jul 1, 2008 9:22 am | |
| Greg KH | Jul 1, 2008 11:25 am | |
| Alan Stern | Jul 1, 2008 11:59 am | |
| Greg KH | Jul 1, 2008 12:13 pm | |
| Stefan Becker | Jul 1, 2008 12:14 pm | |
| David Brownell | Jul 1, 2008 12:21 pm | |
| Greg KH | Jul 1, 2008 12:50 pm |
| Subject: | Re: PATCH: 2.6.26-rc8: Fix IRQF_DISABLED for shared interrupts | |
|---|---|---|
| From: | David Brownell (davi...@public.gmane.org) | |
| Date: | Jun 30, 2008 12:57:25 pm | |
| List: | org.kernel.vger.linux-usb | |
On Monday 30 June 2008, David Brownell wrote:
On Monday 30 June 2008, Stefan Becker wrote:
It seems IRQF_SHARED | IRQF_DISABLED has already been discussed several times on LKML:
Given that, I'm surprised that nobody has added a warning that prints when those two flags are both passed to request_irq().
Well, here's a fix for that little problem.
Notice the rude interaction with LOCKDEP too. If you used that, you'd never have seen the behavior you saw. And if you did use that, with non-IRQF_DISABLED interrupt handlers, you'd wrongly believe some IRQ code paths always ran with IRQs disabled...
- Dave
===== CUT HERE We periodically have problems that get tracked down to the IRQ framework not respecting IRQF_DISABLED for some shared IRQ cases. Linus views this as "will not fix", but we're still left with the bugs caused by this misbehavior.
This patch adds a nag message in request_irq(), so that drivers can fix their IRQ handlers to avoid this problem.
Note that developers will never see the relevant bugs when they run with LOCKDEP, so it's no wonder these bugs are hard to find. (That also means LOCKDEP will be missing some IRQ-related bugs involving IRQ handlers that don't set IRQF_DISABLED.)
Signed-off-by: David Brownell
<dbrownell-Rn4VEauK+AKRv+LV9M...@public.gmane.org>
--- kernel/irq/manage.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
--- a/kernel/irq/manage.c 2008-06-30 12:28:58.000000000 -0700 +++ b/kernel/irq/manage.c 2008-06-30 12:46:54.000000000 -0700 @@ -539,6 +539,18 @@ int request_irq(unsigned int irq, irq_ha struct irqaction *action; int retval;
+ /* + * handle_IRQ_event() always ignores IRQF_DISABLED except for + * the _first_ irqaction (sigh). That can cause oopsing, but + * the behavior is classified as "will not fix" so we need to + * start nudging drivers away from using that idiom. + */ + if ((irqflags & (IRQF_SHARED|IRQF_DISABLED)) + == (IRQF_SHARED|IRQF_DISABLED)) + pr_warning("IRQ %d/%s: IRQF_DISABLED is not " + "guaranteed on shared IRQs\n", + irq, devname); + #ifdef CONFIG_LOCKDEP /* * Lockdep wants atomic interrupt handlers:
-- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majo...@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html






.bz2