From: Don Zickus <dzickus@redhat.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: LKML <linux-kernel@vger.kernel.org>, Don Zickus <dzickus@redhat.com>
Subject: [PATCH 1/3] x86: only call smp_processor_id in non-preempt cases
Date: Fri, 12 Nov 2010 09:50:53 -0500 [thread overview]
Message-ID: <1289573455-3410-1-git-send-email-dzickus@redhat.com> (raw)
There are some paths that walk the die_chain with preemption on.
Make sure we are in an NMI call before we start doing anything.
Reported-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: Don Zickus <dzickus@redhat.com>
---
arch/x86/kernel/apic/hw_nmi.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kernel/apic/hw_nmi.c b/arch/x86/kernel/apic/hw_nmi.c
index 5c4f952..ef4755d 100644
--- a/arch/x86/kernel/apic/hw_nmi.c
+++ b/arch/x86/kernel/apic/hw_nmi.c
@@ -49,7 +49,7 @@ arch_trigger_all_cpu_backtrace_handler(struct notifier_block *self,
{
struct die_args *args = __args;
struct pt_regs *regs;
- int cpu = smp_processor_id();
+ int cpu;
switch (cmd) {
case DIE_NMI:
@@ -60,6 +60,7 @@ arch_trigger_all_cpu_backtrace_handler(struct notifier_block *self,
}
regs = args->regs;
+ cpu = smp_processor_id();
if (cpumask_test_cpu(cpu, to_cpumask(backtrace_mask))) {
static arch_spinlock_t lock = __ARCH_SPIN_LOCK_UNLOCKED;
--
1.7.2.3
next reply other threads:[~2010-11-12 14:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-12 14:50 Don Zickus [this message]
2010-11-12 14:50 ` [PATCH 2/3] x86, hw_nmi: Move backtrace_mask declaration under ARCH_HAS_NMI_WATCHDOG Don Zickus
2010-11-12 14:50 ` [PATCH 3/3] x86: Avoid calling arch_trigger_all_cpu_backtrace() at the same time Don Zickus
2010-11-18 15:57 ` Frederic Weisbecker
2010-11-19 3:00 ` DDD
2010-11-18 8:14 ` [PATCH 1/3] x86: only call smp_processor_id in non-preempt cases Ingo Molnar
2010-11-18 14:22 ` Don Zickus
2010-11-18 14:49 ` Ingo Molnar
2010-11-18 15:35 ` Don Zickus
2011-01-05 3:38 [PATCH 1/3] x86: Only " Don Zickus
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=1289573455-3410-1-git-send-email-dzickus@redhat.com \
--to=dzickus@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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®