Commit bc03613d authored by Fernando Vazquez's avatar Fernando Vazquez Committed by Linus Torvalds

[PATCH] stack overflow safe kdump: safe smp_send_nmi_allbutself()

Re-implement smp_send_nmi_allbutself() so that calls to smp_processor_id
(through send_IPI_allbutself) can be replaced with safe_smp_processor_id
without affecting other parts of the kernel (as suggested by Eric Biederman).
Signed-off-by: default avatarFernando Vazquez <fernando@intellilink.co.jp>
Looks-reasonable-to: Andi Kleen <ak@muc.de>
Acked-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
Cc: Vivek Goyal <vgoyal@in.ibm.com>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent ce53af94
...@@ -134,7 +134,10 @@ static int crash_nmi_callback(struct notifier_block *self, ...@@ -134,7 +134,10 @@ static int crash_nmi_callback(struct notifier_block *self,
static void smp_send_nmi_allbutself(void) static void smp_send_nmi_allbutself(void)
{ {
send_IPI_allbutself(NMI_VECTOR); cpumask_t mask = cpu_online_map;
cpu_clear(safe_smp_processor_id(), mask);
if (!cpus_empty(mask))
send_IPI_mask(mask, NMI_VECTOR);
} }
static struct notifier_block crash_nmi_nb = { static struct notifier_block crash_nmi_nb = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment