From: Thomas Gleixner <tglx@linutronix.de>
To: Mike Galbraith <efault@gmx.de>
Cc: Gabriel C <nix.or.die@gmail.com>, Borislav Petkov <bp@alien8.de>,
Linus Torvalds <torvalds@linux-foundation.org>,
Greg KH <gregkh@linuxfoundation.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
stable <stable@vger.kernel.org>,
lwn@lwn.net, Jiri Slaby <jslaby@suse.cz>,
Ruslan Ruslichenko <rruslich@cisco.com>
Subject: Re: Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box )
Date: Mon, 13 Feb 2017 09:47:15 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.20.1702130912260.3619@nanos> (raw)
In-Reply-To: <1486953115.5912.4.camel@gmx.de>
On Mon, 13 Feb 2017, Mike Galbraith wrote:
> kernel/time/tick-broadcast.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> --- a/kernel/time/tick-broadcast.c
> +++ b/kernel/time/tick-broadcast.c
> @@ -357,6 +357,7 @@ void tick_broadcast_control(enum tick_br
> struct clock_event_device *bc, *dev;
> struct tick_device *td;
> int cpu, bc_stopped;
> + unsigned long flags;
>
> td = this_cpu_ptr(&tick_cpu_device);
> dev = td->evtdev;
> @@ -370,7 +371,7 @@ void tick_broadcast_control(enum tick_br
> if (!tick_device_is_functional(dev))
> return;
>
> - raw_spin_lock(&tick_broadcast_lock);
> + raw_spin_lock_irqsave(&tick_broadcast_lock, flags);
> cpu = smp_processor_id();
> bc = tick_broadcast_device.evtdev;
> bc_stopped = cpumask_empty(tick_broadcast_mask);
> @@ -420,7 +421,7 @@ void tick_broadcast_control(enum tick_br
> tick_broadcast_setup_oneshot(bc);
> }
> }
> - raw_spin_unlock(&tick_broadcast_lock);
> + raw_spin_unlock_irqrestore(&tick_broadcast_lock, flags);
That cures the lockdep splat, but the comment above
tick_broadcast_control() says:
* Called with interrupts disabled, so clockevents_lock is not
* required here because the local clock event device cannot go away
* under us.
So if we want to relax the calling convention, then we need to take the
lock early. Otherwise it's unsafe to fiddle with the local clock event
device.
The calling convention was broken with the following commit:
29d7bbada98e intel_idle: Remove superfluous SMP fuction call
So we could fix it at the call site, but making the core more robust is the
better solution.
I'll fix it up.
Thanks,
tglx
next prev parent reply other threads:[~2017-02-13 8:47 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-26 7:48 Linux 4.9.6 Greg KH
2017-01-26 7:48 ` Greg KH
2017-02-06 17:30 ` Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box ) Gabriel C
2017-02-06 17:41 ` Greg KH
2017-02-06 19:05 ` Ruslan Ruslichenko -X (rruslich - GLOBALLOGIC INC at Cisco)
2017-02-06 20:38 ` Gabriel C
2017-02-06 23:06 ` Linus Torvalds
2017-02-07 20:46 ` Thomas Gleixner
2017-02-07 21:25 ` Thomas Gleixner
2017-02-10 23:17 ` Gabriel C
2017-02-11 1:42 ` Gabriel C
2017-02-11 8:26 ` Thomas Gleixner
2017-02-11 13:09 ` Gabriel C
2017-02-11 14:21 ` Borislav Petkov
2017-02-11 20:58 ` Gabriel C
2017-02-11 21:32 ` Borislav Petkov
2017-02-12 20:21 ` Gabriel C
2017-02-12 21:12 ` Borislav Petkov
2017-02-12 22:21 ` Gabriel C
2017-02-13 0:38 ` Borislav Petkov
2017-02-13 1:26 ` Gabriel C
2017-02-13 2:31 ` Mike Galbraith
2017-02-13 8:47 ` Thomas Gleixner [this message]
2017-02-13 8:52 ` [tip:timers/urgent] tick/broadcast: Prevent deadlock on tick_broadcast_lock tip-bot for Mike Galbraith
2017-02-13 10:28 ` Linux 4.9.6 ( Restore IO-APIC irq_chip retrigger callback , breaks my box ) Borislav Petkov
2017-02-07 21:24 ` Thomas Gleixner
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.20.1702130912260.3619@nanos \
--to=tglx@linutronix.de \
--cc=akpm@linux-foundation.org \
--cc=bp@alien8.de \
--cc=efault@gmx.de \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=lwn@lwn.net \
--cc=nix.or.die@gmail.com \
--cc=rruslich@cisco.com \
--cc=stable@vger.kernel.org \
--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
all inboxes | Powered by JetHome®