mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Eric Miao <eric.y.miao@gmail.com>
To: mingo@redhat.com, hpa@zytor.com, linux-kernel@vger.kernel.org,
	a.p.zijlstra@chello.nl, akpm@linux-foundation.org,
	tglx@linutronix.de, mingo@elte.hu
Cc: linux-tip-commits@vger.kernel.org
Subject: Re: [tip:irq/genirq] genirq: assert that irq handlers are indeed  running in hardirq context
Date: Fri, 10 Apr 2009 15:11:43 +0800	[thread overview]
Message-ID: <f17812d70904100011g65c582bcg32a530afd8e9a82d@mail.gmail.com> (raw)
In-Reply-To: <tip-044d408409cc4e1bc75c886e27ca85c270db104c@git.kernel.org>

On Tue, Mar 3, 2009 at 7:15 AM, Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:
> Commit-ID:  044d408409cc4e1bc75c886e27ca85c270db104c
> Gitweb:     http://git.kernel.org/tip/044d408409cc4e1bc75c886e27ca85c270db104c
> Author:     Peter Zijlstra <a.p.zijlstra@chello.nl>
> AuthorDate: Mon, 2 Mar 2009 16:13:32 +0100
> Commit:     Ingo Molnar <mingo@elte.hu>
> CommitDate: Tue, 3 Mar 2009 00:05:45 +0100
>
> genirq: assert that irq handlers are indeed running in hardirq context
>
> Make sure the genirq layer handlers are indeed running handlers
> in hardirq context. That is the genirq expectation and doing
> anything else is broken.
>
> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> LKML-Reference: <1236006812.5330.632.camel@laptop>
> Signed-off-by: Ingo Molnar <mingo@elte.hu>
>

OK, now this gave me the warning below and it looks resend_irqs()
and resend_tasklet are somehow found guilty and doing wrong, as
the comment of this commit suggested, yet I'm not sure if this makes
sense:


[   34.728943] ------------[ cut here ]------------
[   34.733573] WARNING: at
/home/ycmiao/work/linux-2.6/kernel/irq/handle.c:366
handle_IRQ_event+0x48/0x160()
[   34.743088] BUG: IRQ[82] handler called from non-hardirq
context!Modules linked in:
[   34.750729] [<c002e958>] (unwind_backtrace+0x0/0xdc) from
[<c00438d0>] (warn_slowpath+0x68/0x8c)
[   34.759520] [<c00438d0>] (warn_slowpath+0x68/0x8c) from
[<c006d100>] (handle_IRQ_event+0x48/0x160)
[   34.768461] [<c006d100>] (handle_IRQ_event+0x48/0x160) from
[<c006eb8c>] (handle_edge_irq+0x14c/0x1c4)
[   34.777747] [<c006eb8c>] (handle_edge_irq+0x14c/0x1c4) from
[<c006e440>] (resend_irqs+0x44/0x78)
[   34.786517] [<c006e440>] (resend_irqs+0x44/0x78) from [<c0048658>]
(tasklet_action+0x7c/0xdc)
[   34.795039] [<c0048658>] (tasklet_action+0x7c/0xdc) from
[<c0048b18>] (__do_softirq+0x60/0xe8)
[   34.803638] [<c0048b18>] (__do_softirq+0x60/0xe8) from [<c0048c88>]
(do_softirq+0x44/0x60)
[   34.811881] [<c0048c88>] (do_softirq+0x44/0x60) from [<c0048d1c>]
(ksoftirqd+0x78/0x168)
[   34.819953] [<c0048d1c>] (ksoftirqd+0x78/0x168) from [<c0058d38>]
(kthread+0x54/0x80)
[   34.827786] [<c0058d38>] (kthread+0x54/0x80) from [<c0046780>]
(do_exit+0x0/0x658)
[   34.835342] [<c0046780>] (do_exit+0x0/0x658) from [<00000000>] (0x0)
[   34.841687] ---[ end trace 26b21608484430d3 ]---



>
> ---
>  kernel/irq/handle.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c
> index 3aba8d1..a2ee682 100644
> --- a/kernel/irq/handle.c
> +++ b/kernel/irq/handle.c
> @@ -328,6 +328,8 @@ irqreturn_t handle_IRQ_event(unsigned int irq, struct irqaction *action)
>        irqreturn_t ret, retval = IRQ_NONE;
>        unsigned int status = 0;
>
> +       WARN_ONCE(!in_irq(), "BUG: IRQ handler called from non-hardirq context!");
> +
>        if (!(action->flags & IRQF_DISABLED))
>                local_irq_enable_in_hardirq();
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
>



-- 
Cheers
- eric

  reply	other threads:[~2009-04-10  7:11 UTC|newest]

Thread overview: 106+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-27 19:28 [PATCH 1/2] input: misc: add twl4030-pwrbutton driver Felipe Balbi
2009-02-27 19:28 ` [PATCH 2/2] mfd: twl4030: add twl4030-pwrbutton as our child Felipe Balbi
2009-02-27 20:36   ` Andrew Morton
2009-02-27 21:58     ` David Brownell
2009-02-27 22:09       ` Felipe Balbi
2009-02-27 22:12       ` Andrew Morton
2009-02-27 23:20         ` David Brownell
2009-02-27 23:42           ` Andrew Morton
2009-07-22 19:27             ` Trilok Soni
2009-07-22 22:25               ` David Brownell
2009-02-27 20:33 ` [PATCH 1/2] input: misc: add twl4030-pwrbutton driver Andrew Morton
2009-02-27 20:37   ` Felipe Balbi
2009-02-27 21:50     ` lockdep and threaded IRQs (was: [PATCH 1/2] input: misc: add twl4030-pwrbutton driver) David Brownell
2009-02-27 22:09       ` Andrew Morton
2009-02-27 23:18         ` lockdep and threaded IRQs (was: ...) David Brownell
2009-02-27 23:32           ` Andrew Morton
2009-02-28  0:01             ` Andrew Morton
2009-02-28  2:30               ` David Brownell
2009-02-28  2:39                 ` Andrew Morton
2009-02-28  4:46                   ` David Brownell
2009-02-28  5:12                     ` Andrew Morton
2009-02-28  6:17                       ` David Brownell
2009-02-28 11:13                     ` Thomas Gleixner
2009-02-28 12:16                       ` David Brownell
2009-02-28 16:42                         ` Thomas Gleixner
2009-02-28 20:02                           ` David Brownell
2009-02-28 20:55                             ` Thomas Gleixner
2009-02-28 21:13                               ` Thomas Gleixner
2009-02-28 22:37                                 ` David Brownell
2009-02-28 22:05                               ` David Brownell
2009-03-01  9:43                                 ` Thomas Gleixner
2009-03-01 22:54                                   ` David Brownell
2009-03-02 13:16                                     ` Peter Zijlstra
2009-03-02 21:04                                       ` David Brownell
2009-03-02 21:16                                         ` Peter Zijlstra
2009-03-02 21:29                                           ` Andrew Morton
2009-03-02 21:37                                           ` David Brownell
2009-03-02 21:41                                             ` Peter Zijlstra
2009-03-02 22:09                                               ` David Brownell
2009-03-02 22:19                                                 ` Peter Zijlstra
2009-03-02 22:40                                                   ` David Brownell
2009-03-02 22:51                                                     ` Peter Zijlstra
2009-03-02 23:29                                                       ` David Brownell
2009-03-03  7:45                                                         ` Peter Zijlstra
2009-03-02 22:46                                                   ` lockdep and threaded IRQs David Miller
2009-03-02 22:57                                                     ` Andrew Morton
2009-03-02 23:07                                                       ` Peter Zijlstra
2009-03-02 23:02                                                     ` Peter Zijlstra
2009-03-02 23:35                                           ` lockdep and threaded IRQs (was: ...) Alan Cox
2009-03-01 22:11                               ` David Brownell
2009-02-28 11:48                     ` lockdep and threaded IRQs Stefan Richter
2009-02-28 20:19                       ` David Brownell
2009-02-28 21:10                         ` Stefan Richter
2009-03-02 13:16           ` lockdep and threaded IRQs (was: ...) Peter Zijlstra
2009-03-02 22:10             ` David Brownell
2009-03-02 22:25               ` Peter Zijlstra
2009-03-02 23:20                 ` David Brownell
2009-03-02 23:26                   ` Ingo Molnar
2009-03-02 23:42                     ` David Brownell
2009-03-02 23:53                       ` Ingo Molnar
2009-03-03  0:33                         ` David Brownell
2009-03-03  0:44                           ` Ingo Molnar
2009-03-03  2:37                             ` David Brownell
2009-03-03  9:27                               ` Peter Zijlstra
2009-03-03  9:45                                 ` Ingo Molnar
2009-03-03  9:47                                 ` Alan Cox
2009-03-03 10:03                                   ` Ingo Molnar
2009-03-03 10:30                                     ` Alan Cox
2009-03-03 10:39                                       ` Peter Zijlstra
2009-03-03 10:48                                       ` Ingo Molnar
2009-03-03 11:13                                         ` Alan Cox
2009-03-03 11:33                                           ` Ingo Molnar
2009-03-03 11:19                                         ` Ingo Molnar
2009-03-18  1:04                                         ` David Brownell
2009-03-18  2:00                             ` David Brownell
2009-03-18  2:14                             ` [patch/rfc 0/2] handle_threaded_irq() David Brownell
2009-03-18  2:19                               ` [patch/rfc 1/2] GENIRQ: add handle_threaded_irq() flow handler David Brownell
2009-03-18 12:00                                 ` Felipe Balbi
2009-03-18 18:31                                   ` David Brownell
2009-03-18 18:32                                     ` Felipe Balbi
2009-03-18  2:22                               ` [patch/rfc 2/2] twl4030: use new " David Brownell
2009-03-03 11:53                       ` lockdep and threaded IRQs (was: ...) Thomas Gleixner
2009-03-05  2:49                         ` David Brownell
2009-03-06 14:40                           ` Thomas Gleixner
2009-03-18  3:06                             ` David Brownell
2009-03-02 23:48                     ` David Brownell
2009-03-02 23:58                       ` Ingo Molnar
2009-03-02 15:13           ` [PATCH] genirq: assert that irq handlers are indeed run in hardirq context Peter Zijlstra
2009-03-02 19:48             ` David Brownell
2009-03-02 22:01             ` [tip:irq/genirq] genirq: assert that irq handlers are indeed running " Peter Zijlstra
2009-03-02 23:15             ` Peter Zijlstra
2009-04-10  7:11               ` Eric Miao [this message]
2009-04-10  9:57                 ` Thomas Gleixner
2009-02-28 11:20       ` lockdep and threaded IRQs Stefan Richter
2009-02-28 20:10         ` David Brownell
2009-02-28  5:51 ` [PATCH 1/2] input: misc: add twl4030-pwrbutton driver Trilok Soni
2009-02-28 12:05   ` [PATCH] mfd: twl4030: add twl4030-pwrbutton as our child Felipe Balbi
2009-02-28 22:23 ` [PATCH 1/2] input: misc: add twl4030-pwrbutton driver Dmitry Torokhov
2009-03-01  0:30   ` Felipe Balbi
2009-03-01  0:58     ` Dmitry Torokhov
2009-03-01 14:40       ` Felipe Balbi
2009-03-04  9:00         ` Dmitry Torokhov
2009-03-04 10:12           ` Felipe Balbi
2009-03-05  1:38             ` David Brownell
2009-03-05 23:54           ` David Brownell
2009-03-06  9:43             ` Dmitry Torokhov

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=f17812d70904100011g65c582bcg32a530afd8e9a82d@mail.gmail.com \
    --to=eric.y.miao@gmail.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    /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®