From: Thomas Gleixner <tglx@linutronix.de>
To: James Hogan <james.hogan@imgtec.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] metag: kick: add missing irq_enter/exit to kick_handler()
Date: Tue, 2 Jul 2013 14:28:51 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.02.1307021428370.4013@ionos.tec.linutronix.de> (raw)
In-Reply-To: <1372759013-29911-1-git-send-email-james.hogan@imgtec.com>
On Tue, 2 Jul 2013, James Hogan wrote:
> kick_handler() doesn't have an irq_enter/exit pair, but it's used for
> handling SMP IPIs which require work to be done in softirqs, which are
> invoked from irq_exit() when the hard irq nest count reaches 0.
>
> The scheduler_ipi() callback in the IPI handler calls irq_enter/exit
> itself, but this is inside kick_handler()'s spin lock critical section,
> so if an invoked softirq issues an IPI the kick_handler() will be
> re-entered on the same CPU and will deadlock.
>
> This is easily fixed by adding the missing irq_enter/exit to
> kick_handler() so that the hard irq nest count doesn't reach 0 until
> after the spin lock has been released.
>
> Ideally the spin lock protected handler list will also be replaced by a
> lockless RCU protected list since it is certainly mostly read. That can
> be done in a later change though.
>
> Signed-off-by: James Hogan <james.hogan@imgtec.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
prev parent reply other threads:[~2013-07-02 12:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-02 9:56 James Hogan
2013-07-02 12:28 ` Thomas Gleixner [this message]
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=alpine.DEB.2.02.1307021428370.4013@ionos.tec.linutronix.de \
--to=tglx@linutronix.de \
--cc=james.hogan@imgtec.com \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®