Skip to content

Commit

Permalink
[PATCH] stack overflow safe kdump: safe smp_send_nmi_allbutself()
Browse files Browse the repository at this point in the history
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: Fernando Vazquez <fernando@intellilink.co.jp>
Looks-reasonable-to: Andi Kleen <ak@muc.de>
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Vivek Goyal <vgoyal@in.ibm.com>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Fernando Vazquez authored and Linus Torvalds committed Oct 1, 2006
1 parent ce53af9 commit bc03613
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion arch/i386/kernel/crash.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,10 @@ static int crash_nmi_callback(struct notifier_block *self,

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 = {
Expand Down

0 comments on commit bc03613

Please sign in to comment.