Skip to content

Commit bc03613

Browse files
Fernando VazquezLinus Torvalds
authored andcommitted
[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: 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>
1 parent ce53af9 commit bc03613

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎arch/i386/kernel/crash.c‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,10 @@ static int crash_nmi_callback(struct notifier_block *self,
134134

135135
static void smp_send_nmi_allbutself(void)
136136
{
137-
send_IPI_allbutself(NMI_VECTOR);
137+
cpumask_t mask = cpu_online_map;
138+
cpu_clear(safe_smp_processor_id(), mask);
139+
if (!cpus_empty(mask))
140+
send_IPI_mask(mask, NMI_VECTOR);
138141
}
139142

140143
static struct notifier_block crash_nmi_nb = {

0 commit comments

Comments
 (0)