Re: WARNING: at arch/x86_64/kernel/smp.c:397 smp_call_function_mask()

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Laurent Vivier <Laurent.Vivier@...>
Cc: Andrew Morton <akpm@...>, Andi Kleen <ak@...>, <linux-kernel@...>
Date: Saturday, September 29, 2007 - 4:15 am

On Fri, Sep 28, 2007 at 02:07:54PM +0200, Laurent Vivier wrote:

Thank god it's a bug in alternative_instructions() instead of global_flush_tlb().

The following patch fixed it.

===
call free_init_pages() with irqs enabled in alternative_instructions()

It fixes the warning message in smp_call_function*(), which should be called
with irqs disabled.

[    0.310000] CPU: L1 I Cache: 64K (64 bytes/line), D cache 64K (64 bytes/line)
[    0.310000] CPU: L2 Cache: 512K (64 bytes/line)
[    0.310000] CPU 0/0 -> Node 0
[    0.310000] SMP alternatives: switching to UP code
[    0.310000] Freeing SMP alternatives: 25k freed
[    0.310000] WARNING: at arch/x86_64/kernel/smp.c:397 smp_call_function_mask()
[    0.310000]
[    0.310000] Call Trace:
[    0.310000]  [<ffffffff8100dbde>] dump_trace+0x3ee/0x4a0
[    0.310000]  [<ffffffff8100dcd3>] show_trace+0x43/0x70
[    0.310000]  [<ffffffff8100dd15>] dump_stack+0x15/0x20
[    0.310000]  [<ffffffff8101cd44>] smp_call_function_mask+0x94/0xa0
[    0.310000]  [<ffffffff8101d0b2>] smp_call_function+0x32/0x40
[    0.310000]  [<ffffffff8104277f>] on_each_cpu+0x1f/0x50
[    0.310000]  [<ffffffff81026eac>] global_flush_tlb+0x8c/0x110
[    0.310000]  [<ffffffff81025c85>] free_init_pages+0xe5/0xf0
[    0.310000]  [<ffffffff81549b5e>] alternative_instructions+0x7e/0x150
[    0.310000]  [<ffffffff8154a2ea>] check_bugs+0x1a/0x20
[    0.310000]  [<ffffffff81540c4a>] start_kernel+0x2da/0x380
[    0.310000]  [<ffffffff81540132>] _sinittext+0x132/0x140
[    0.310000]
[    0.320000] ACPI: Core revision 20070126
[    0.560000] Using local APIC timer interrupts.
[    0.590000] Detected 62.496 MHz APIC timer.
[    0.590000] Brought up 1 CPUs

Cc: Laurent Vivier <Laurent.Vivier@bull.net>
Cc: Andi Kleen <ak@suse.de> 
Signed-off-by: Fengguang Wu <wfg@mail.ustc.edu.cn>
---
 arch/i386/kernel/alternative.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

--- linux-2.6.23-rc8-mm2.orig/arch/i386/kernel/alternative.c
+++ linux-2.6.23-rc8-mm2/arch/i386/kernel/alternative.c
@@ -435,9 +435,6 @@ void __init alternative_instructions(voi
 			alternatives_smp_unlock(__smp_locks, __smp_locks_end,
 						_text, _etext);
 		}
-		free_init_pages("SMP alternatives",
-				(unsigned long)__smp_locks,
-				(unsigned long)__smp_locks_end);
 	} else {
 		alternatives_smp_module_add(NULL, "core kernel",
 					    __smp_locks, __smp_locks_end,
@@ -448,6 +445,11 @@ void __init alternative_instructions(voi
  	apply_paravirt(__parainstructions, __parainstructions_end);
 	local_irq_restore(flags);
 
+	if (smp_alt_once)
+		free_init_pages("SMP alternatives",
+				(unsigned long)__smp_locks,
+				(unsigned long)__smp_locks_end);
+
 	restart_nmi();
 #ifdef CONFIG_X86_MCE
 	restart_mce();

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
2.6.23-rc8-mm2, Andrew Morton, (Thu Sep 27, 5:22 am)
Re: 2.6.23-rc8-mm2, Matt Mackall, (Tue Oct 9, 1:49 pm)
Re: 2.6.23-rc8-mm2 - PowerPC link failure at arch/powerpc/ke..., Kamalesh Babulal, (Sun Sep 30, 12:10 am)
Re: 2.6.23-rc8-mm2, , (Sat Sep 29, 10:26 pm)
Re: 2.6.23-rc8-mm2, Andrew Morton, (Sun Sep 30, 4:50 am)
Re: 2.6.23-rc8-mm2, , (Mon Oct 1, 12:12 pm)
Re: 2.6.23-rc8-mm2, Rafael J. Wysocki, (Sun Sep 30, 4:01 pm)
Re: 2.6.23-rc8-mm2, , (Mon Oct 1, 1:12 pm)
Re: 2.6.23-rc8-mm2, Dave Young, (Sat Sep 29, 5:37 am)
Re: 2.6.23-rc8-mm2, Greg KH, (Sat Sep 29, 11:19 am)
Re: 2.6.23-rc8-mm2, Dave Young, (Mon Oct 8, 2:43 am)
Re: 2.6.23-rc8-mm2, , (Sun Sep 30, 1:18 am)
Re: 2.6.23-rc8-mm2, Dave Young, (Sat Sep 29, 9:29 pm)
/proc/net/ bad hard links count [Was: 2.6.23-rc8-mm2], Jiri Slaby, (Fri Sep 28, 12:30 pm)
Re: /proc/net/ bad hard links count [Was: 2.6.23-rc8-mm2], Eric W. Biederman, (Fri Sep 28, 1:03 pm)
Re: 2.6.23-rc8-mm2 - tcp_fastretrans_alert() WARNING, Cedric Le Goater, (Fri Sep 28, 11:42 am)
Re: 2.6.23-rc8-mm2 - tcp_fastretrans_alert() WARNING, Ilpo Järvinen, (Fri Sep 28, 3:10 pm)
Re: 2.6.23-rc8-mm2 - tcp_fastretrans_alert() WARNING, Ilpo Järvinen, (Sat Sep 29, 8:44 am)
Re: 2.6.23-rc8-mm2 - tcp_fastretrans_alert() WARNING, Cedric Le Goater, (Sat Sep 29, 10:55 am)
Re: 2.6.23-rc8-mm2 - tcp_fastretrans_alert() WARNING, Ilpo Järvinen, (Sat Sep 29, 4:49 pm)
Re: 2.6.23-rc8-mm2 - tcp_fastretrans_alert() WARNING, Cedric Le Goater, (Mon Oct 1, 5:26 am)
Re: 2.6.23-rc8-mm2 - tcp_fastretrans_alert() WARNING, Ilpo Järvinen, (Tue Oct 2, 6:26 am)
Re: 2.6.23-rc8-mm2 - tcp_fastretrans_alert() WARNING, Ilpo Järvinen, (Tue Oct 2, 4:06 pm)
Re: 2.6.23-rc8-mm2 - tcp_fastretrans_alert() WARNING, Ilpo Järvinen, (Tue Oct 2, 5:48 pm)
Re: WARNING: at arch/x86_64/kernel/smp.c:397 smp_call_functi..., Fengguang Wu, (Sat Sep 29, 4:15 am)
Re: 2.6.23-rc8-mm2: BUG near reiserfs_xattr_set, Laurent Riffard, (Thu Sep 27, 3:18 pm)
Re: 2.6.23-rc8-mm2: BUG near reiserfs_xattr_set, Andrew Morton, (Thu Sep 27, 3:48 pm)
Re: 2.6.23-rc8-mm2: BUG near reiserfs_xattr_set, Christoph Hellwig, (Thu Sep 27, 4:26 pm)
Re: [RFC][PATCH] make reiserfs stop using 'struct file' for ..., Christoph Hellwig, (Thu Sep 27, 5:04 pm)
Re: [RFC][PATCH] make reiserfs stop using 'struct file' for ..., Christoph Hellwig, (Fri Sep 28, 3:16 am)
[RFC][PATCH] stop abusing filp_open in reiserfs journal code, Christoph Hellwig, (Fri Sep 28, 3:29 am)
Re: 2.6.23-rc8-mm2: BUG near reiserfs_xattr_set, Dave Hansen, (Thu Sep 27, 4:05 pm)
Re: 2.6.23-rc8-mm2: problems on HP nx6325, Rafael J. Wysocki, (Thu Sep 27, 11:19 am)
Re: 2.6.23-rc8-mm2: problems on HP nx6325, Rafael J. Wysocki, (Thu Sep 27, 11:59 am)
Re: 2.6.23-rc8-mm2: problems on HP nx6325, Sam Ravnborg, (Thu Sep 27, 12:53 pm)
Re: 2.6.23-rc8-mm2: problems on HP nx6325, Randy Dunlap, (Thu Sep 27, 1:33 pm)
Re: 2.6.23-rc8-mm2: problems on HP nx6325, Sam Ravnborg, (Thu Sep 27, 3:19 pm)
Re: 2.6.23-rc8-mm2: problems on HP nx6325, Rafael J. Wysocki, (Thu Sep 27, 3:48 pm)
Re: 2.6.23-rc8-mm2: problems on HP nx6325, Randy Dunlap, (Thu Sep 27, 3:37 pm)
Re: 2.6.23-rc8-mm2: problems on HP nx6325, Rafael J. Wysocki, (Thu Sep 27, 4:01 pm)
Re: 2.6.23-rc8-mm2: problems on HP nx6325, Thomas Gleixner, (Thu Sep 27, 11:49 am)
Re: 2.6.23-rc8-mm2: problems on HP nx6325, Rafael J. Wysocki, (Fri Sep 28, 5:31 pm)
Re: 2.6.23-rc8-mm2 - drivers/net/ibm_newemac/mal - broken, Kamalesh Babulal, (Thu Sep 27, 6:52 am)