From: tip-bot for Don Zickus <dzickus@redhat.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
jan.kiszka@web.de, tglx@linutronix.de, mingo@elte.hu,
dzickus@redhat.com
Subject: [tip:perf/core] x86: Only call smp_processor_id in non-preempt cases
Date: Wed, 5 Jan 2011 14:07:33 GMT [thread overview]
Message-ID: <tip-9ab181fa9ff73a38fccd0a4f1c40a38dfe62b535@git.kernel.org> (raw)
In-Reply-To: <1294198689-15447-1-git-send-email-dzickus@redhat.com>
Commit-ID: 9ab181fa9ff73a38fccd0a4f1c40a38dfe62b535
Gitweb: http://git.kernel.org/tip/9ab181fa9ff73a38fccd0a4f1c40a38dfe62b535
Author: Don Zickus <dzickus@redhat.com>
AuthorDate: Tue, 4 Jan 2011 22:38:07 -0500
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Wed, 5 Jan 2011 14:22:57 +0100
x86: Only call smp_processor_id in non-preempt cases
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.
This was triggered by do_general_protection calling notify_die
with DIE_GPF.
Reported-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: Don Zickus <dzickus@redhat.com>
LKML-Reference: <1294198689-15447-1-git-send-email-dzickus@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
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 c57d0b5..2b40a60 100644
--- a/arch/x86/kernel/apic/hw_nmi.c
+++ b/arch/x86/kernel/apic/hw_nmi.c
@@ -51,7 +51,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:
@@ -63,6 +63,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;
prev parent reply other threads:[~2011-01-05 14:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-05 3:38 [PATCH 1/3] x86: Only call smp_processor_id in non-preempt cases Don Zickus
2011-01-05 3:38 ` [PATCH 2/3] x86: Avoid calling arch_trigger_all_cpu_backtrace() at the same time Don Zickus
2011-01-05 14:07 ` [tip:perf/core] " tip-bot for Dongdong Deng
2011-01-05 3:38 ` [PATCH 3/3] x86, NMI: Add touch_nmi_watchdog to io_check_error delay Don Zickus
2011-01-05 14:08 ` [tip:perf/core] " tip-bot for Huang Ying
2011-01-05 14:07 ` tip-bot for Don Zickus [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-9ab181fa9ff73a38fccd0a4f1c40a38dfe62b535@git.kernel.org \
--to=dzickus@redhat.com \
--cc=hpa@zytor.com \
--cc=jan.kiszka@web.de \
--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