Skip to contentSkip to conversation

stack overflow safe kdump (2.6.18-rc1-i386) - safe_smp_send_nmi_allbutself

PATCH In review Fernando Luis Vázquez Cao 1 participant 1 message Jul 11, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 4/4 stack overflow safe kdump (2.6.18-rc1-i386) - 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).

---

arch/i386/kernel/crash.c +4 -1
diff -urNp linux-2.6.18-rc1/arch/i386/kernel/crash.c linux-2.6.18-rc1-sof/arch/i386/kernel/crash.c
@@ -122,7 +122,10 @@ static int crash_nmi_callback(struct pt_
 
 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 void nmi_shootdown_cpus(void)