[PATCH 3/3] stack overflow safe kdump (2.6.18-rc1-i386) - ipi_use_safe_smp_processor_id

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Substitute "smp_processor_id" with the stack overflow-safe
"safe_smp_processor_id" in the send IPI functions, since
they are used after a crash to shutdown CPUs.

Signed-off-by: Fernando Vazquez <[email protected]>
---

diff -urNp linux-2.6.18-rc1/include/asm-i386/mach-bigsmp/mach_ipi.h linux-2.6.18-rc1-sof/include/asm-i386/mach-bigsmp/mach_ipi.h
--- linux-2.6.18-rc1/include/asm-i386/mach-bigsmp/mach_ipi.h	2006-06-18 10:49:35.000000000 +0900
+++ linux-2.6.18-rc1-sof/include/asm-i386/mach-bigsmp/mach_ipi.h	2006-07-10 16:13:33.000000000 +0900
@@ -11,7 +11,7 @@ static inline void send_IPI_mask(cpumask
 static inline void send_IPI_allbutself(int vector)
 {
 	cpumask_t mask = cpu_online_map;
-	cpu_clear(smp_processor_id(), mask);
+	cpu_clear(safe_smp_processor_id(), mask);
 
 	if (!cpus_empty(mask))
 		send_IPI_mask(mask, vector);
diff -urNp linux-2.6.18-rc1/include/asm-i386/mach-default/mach_ipi.h linux-2.6.18-rc1-sof/include/asm-i386/mach-default/mach_ipi.h
--- linux-2.6.18-rc1/include/asm-i386/mach-default/mach_ipi.h	2006-07-10 11:00:05.000000000 +0900
+++ linux-2.6.18-rc1-sof/include/asm-i386/mach-default/mach_ipi.h	2006-07-10 16:14:15.000000000 +0900
@@ -19,7 +19,7 @@ static inline void __local_send_IPI_allb
 	if (no_broadcast || vector == NMI_VECTOR) {
 		cpumask_t mask = cpu_online_map;
 
-		cpu_clear(smp_processor_id(), mask);
+		cpu_clear(safe_smp_processor_id(), mask);
 		send_IPI_mask(mask, vector);
 	} else
 		__send_IPI_shortcut(APIC_DEST_ALLBUT, vector);
diff -urNp linux-2.6.18-rc1/include/asm-i386/mach-es7000/mach_ipi.h linux-2.6.18-rc1-sof/include/asm-i386/mach-es7000/mach_ipi.h
--- linux-2.6.18-rc1/include/asm-i386/mach-es7000/mach_ipi.h	2006-06-18 10:49:35.000000000 +0900
+++ linux-2.6.18-rc1-sof/include/asm-i386/mach-es7000/mach_ipi.h	2006-07-10 16:14:51.000000000 +0900
@@ -11,7 +11,7 @@ static inline void send_IPI_mask(cpumask
 static inline void send_IPI_allbutself(int vector)
 {
 	cpumask_t mask = cpu_online_map;
-	cpu_clear(smp_processor_id(), mask);
+	cpu_clear(safe_smp_processor_id(), mask);
 	if (!cpus_empty(mask))
 		send_IPI_mask(mask, vector);
 }
diff -urNp linux-2.6.18-rc1/include/asm-i386/mach-numaq/mach_ipi.h linux-2.6.18-rc1-sof/include/asm-i386/mach-numaq/mach_ipi.h
--- linux-2.6.18-rc1/include/asm-i386/mach-numaq/mach_ipi.h	2006-06-18 10:49:35.000000000 +0900
+++ linux-2.6.18-rc1-sof/include/asm-i386/mach-numaq/mach_ipi.h	2006-07-10 16:15:26.000000000 +0900
@@ -11,7 +11,7 @@ static inline void send_IPI_mask(cpumask
 static inline void send_IPI_allbutself(int vector)
 {
 	cpumask_t mask = cpu_online_map;
-	cpu_clear(smp_processor_id(), mask);
+	cpu_clear(safe_smp_processor_id(), mask);
 
 	if (!cpus_empty(mask))
 		send_IPI_mask(mask, vector);
diff -urNp linux-2.6.18-rc1/include/asm-i386/mach-summit/mach_ipi.h linux-2.6.18-rc1-sof/include/asm-i386/mach-summit/mach_ipi.h
--- linux-2.6.18-rc1/include/asm-i386/mach-summit/mach_ipi.h	2006-06-18 10:49:35.000000000 +0900
+++ linux-2.6.18-rc1-sof/include/asm-i386/mach-summit/mach_ipi.h	2006-07-10 16:16:06.000000000 +0900
@@ -11,7 +11,7 @@ static inline void send_IPI_mask(cpumask
 static inline void send_IPI_allbutself(int vector)
 {
 	cpumask_t mask = cpu_online_map;
-	cpu_clear(smp_processor_id(), mask);
+	cpu_clear(safe_smp_processor_id(), mask);
 
 	if (!cpus_empty(mask))
 		send_IPI_mask(mask, vector);


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux