mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 2.6.17 sparc64] fix stack overflow checking in modular non-SMP kernels
@ 2006-07-04 20:10 Mikael Pettersson
  2006-07-06  3:43 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Mikael Pettersson @ 2006-07-04 20:10 UTC (permalink / raw)
  To: davem; +Cc: linux-kernel, sparclinux

The sparc64 kernel's EXPORT_SYMBOL(_mcount) is inside an
#ifdef CONFIG_SMP. This breaks modules in non-SMP kernels
built with stack overflow checking (CONFIG_STACK_DEBUG=y),
as modules_install reports:

WARNING: /lib/modules/2.6.17/kernel/drivers/ide/ide-cd.ko needs unknown symbol _mcount

Trivially fixed by moving EXPORT_SYMBOL(_mcount) outside of
the #ifdef CONFIG_SMP.

Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>

--- linux-2.6.17/arch/sparc64/kernel/sparc64_ksyms.c.~1~	2006-06-18 12:13:02.000000000 +0200
+++ linux-2.6.17/arch/sparc64/kernel/sparc64_ksyms.c	2006-07-04 20:41:07.000000000 +0200
@@ -128,11 +128,6 @@ EXPORT_SYMBOL(__write_trylock);
 /* Hard IRQ locking */
 EXPORT_SYMBOL(synchronize_irq);
 
-#if defined(CONFIG_MCOUNT)
-extern void _mcount(void);
-EXPORT_SYMBOL(_mcount);
-#endif
-
 /* CPU online map and active count.  */
 EXPORT_SYMBOL(cpu_online_map);
 EXPORT_SYMBOL(phys_cpu_present_map);
@@ -140,6 +135,11 @@ EXPORT_SYMBOL(phys_cpu_present_map);
 EXPORT_SYMBOL(smp_call_function);
 #endif /* CONFIG_SMP */
 
+#if defined(CONFIG_MCOUNT)
+extern void _mcount(void);
+EXPORT_SYMBOL(_mcount);
+#endif
+
 EXPORT_SYMBOL(sparc64_get_clock_tick);
 
 /* semaphores */

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-07-06  3:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-04 20:10 [PATCH 2.6.17 sparc64] fix stack overflow checking in modular non-SMP kernels Mikael Pettersson
2006-07-06  3:43 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®