From: tip-bot for Xiaotian Feng <dfeng@redhat.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
marc.c.dionne@gmail.com, tglx@linutronix.de, dfeng@redhat.com
Subject: [tip:timers/urgent] clockevent: Don't remove broadcast device when cpu is dead
Date: Mon, 18 Jan 2010 13:48:39 GMT [thread overview]
Message-ID: <tip-ea9d8e3f45404d411c00ae67b45cc35c58265bb7@git.kernel.org> (raw)
In-Reply-To: <1262834564-13033-1-git-send-email-dfeng@redhat.com>
Commit-ID: ea9d8e3f45404d411c00ae67b45cc35c58265bb7
Gitweb: http://git.kernel.org/tip/ea9d8e3f45404d411c00ae67b45cc35c58265bb7
Author: Xiaotian Feng <dfeng@redhat.com>
AuthorDate: Thu, 7 Jan 2010 11:22:44 +0800
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Mon, 18 Jan 2010 14:44:50 +0100
clockevent: Don't remove broadcast device when cpu is dead
Marc reported that the BUG_ON in clockevents_notify() triggers on his
system. This happens because the kernel tries to remove an active
clock event device (used for broadcasting) from the device list.
The handling of devices which can be used as per cpu device and as a
global broadcast device is suboptimal.
The simplest solution for now (and for stable) is to check whether the
device is used as global broadcast device, but this needs to be
revisited.
[ tglx: restored the cpuweight check and massaged the changelog ]
Reported-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Signed-off-by: Xiaotian Feng <dfeng@redhat.com>
LKML-Reference: <1262834564-13033-1-git-send-email-dfeng@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@kernel.org
---
kernel/time/clockevents.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c
index 6f740d9..d7395fd 100644
--- a/kernel/time/clockevents.c
+++ b/kernel/time/clockevents.c
@@ -259,7 +259,8 @@ void clockevents_notify(unsigned long reason, void *arg)
cpu = *((int *)arg);
list_for_each_entry_safe(dev, tmp, &clockevent_devices, list) {
if (cpumask_test_cpu(cpu, dev->cpumask) &&
- cpumask_weight(dev->cpumask) == 1) {
+ cpumask_weight(dev->cpumask) == 1 &&
+ !tick_is_broadcast_device(dev)) {
BUG_ON(dev->mode != CLOCK_EVT_MODE_UNUSED);
list_del(&dev->list);
}
prev parent reply other threads:[~2010-01-18 13:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-07 3:22 [PATCH] clockevent: don't remove broadcast device when cpu is dead Xiaotian Feng
2010-01-12 2:24 ` Xiaotian Feng
2010-01-12 13:20 ` Thomas Gleixner
2010-01-13 1:28 ` Marc Dionne
2010-01-13 1:48 ` Xiaotian Feng
2010-01-13 22:08 ` Thomas Gleixner
2010-01-14 11:43 ` Xiaotian Feng
2010-01-14 11:52 ` Thomas Gleixner
2010-01-18 13:48 ` tip-bot for Xiaotian Feng [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=tip-ea9d8e3f45404d411c00ae67b45cc35c58265bb7@git.kernel.org \
--to=dfeng@redhat.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=marc.c.dionne@gmail.com \
--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