lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-636afdbe85d50d9b88f5283b5e6d0f8518431aac@git.kernel.org>
Date:	Mon, 11 May 2009 13:09:32 GMT
From:	tip-bot for Ian Campbell <Ian.Campbell@...citrix.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
	ian.campbell@...rix.com, Jeremy.Fitzhardinge@...rix.com,
	tglx@...utronix.de, Ian.Campbell@...citrix.com, mingo@...e.hu,
	xen-devel@...ts.xensource.com
Subject: [tip:x86/xen] x86: use flush_tlb_others to implement flush_tlb_all, fix

Commit-ID:  636afdbe85d50d9b88f5283b5e6d0f8518431aac
Gitweb:     http://git.kernel.org/tip/636afdbe85d50d9b88f5283b5e6d0f8518431aac
Author:     Ian Campbell <Ian.Campbell@...citrix.com>
AuthorDate: Fri, 8 May 2009 16:52:07 +0100
Committer:  Ingo Molnar <mingo@...e.hu>
CommitDate: Mon, 11 May 2009 15:08:08 +0200

x86: use flush_tlb_others to implement flush_tlb_all, fix

"use the flush_tlb_others() call to implement flush_tlb_all()"
causes:
         BUG: spinlock bad magic on CPU#0, swapper/0
          lock: c05b7588, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0
         Pid: 0, comm: swapper Not tainted 2.6.30-rc3-x86_32p-xen0-tip-01797-g3db7847 #1054
         Call Trace:
          [<c023e656>] spin_bug+0x96/0xf0
          [<c023e90f>] _raw_spin_lock+0x6f/0x150

It can be called before the core_initcalls are run. Explicitly call
init_smp_flush early on.

Also there is no need for init_smp_flush to be __cpuinit.

[ Impact: fix boot crash/warning ]

Signed-off-by: Ian Campbell <ian.campbell@...rix.com>
Cc: Xen-devel <xen-devel@...ts.xensource.com>
Acked-by: Jeremy Fitzhardinge <Jeremy.Fitzhardinge@...rix.com>
LKML-Reference: <1241797927.15972.51.camel@...az.uk.xensource.com>
Signed-off-by: Ingo Molnar <mingo@...e.hu>


---
 arch/x86/include/asm/tlbflush.h |    2 ++
 arch/x86/mm/tlb.c               |    3 +--
 init/main.c                     |    1 +
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/x86/include/asm/tlbflush.h b/arch/x86/include/asm/tlbflush.h
index 16a5c84..2a4848d 100644
--- a/arch/x86/include/asm/tlbflush.h
+++ b/arch/x86/include/asm/tlbflush.h
@@ -129,6 +129,8 @@ static inline void reset_lazy_tlbstate(void)
 
 #define local_flush_tlb() __flush_tlb()
 
+extern int init_smp_flush(void);
+
 extern void flush_tlb_all(void);
 extern void flush_tlb_current_task(void);
 extern void flush_tlb_mm(struct mm_struct *);
diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c
index e69bdad..0f030fb 100644
--- a/arch/x86/mm/tlb.c
+++ b/arch/x86/mm/tlb.c
@@ -229,7 +229,7 @@ void native_flush_tlb_others(const struct cpumask *cpumask,
 	flush_tlb_others_ipi(cpumask, mm, va);
 }
 
-static int __cpuinit init_smp_flush(void)
+int __init init_smp_flush(void)
 {
 	int i;
 
@@ -238,7 +238,6 @@ static int __cpuinit init_smp_flush(void)
 
 	return 0;
 }
-core_initcall(init_smp_flush);
 
 void flush_tlb_current_task(void)
 {
diff --git a/init/main.c b/init/main.c
index 3bbf93b..20e86f8 100644
--- a/init/main.c
+++ b/init/main.c
@@ -650,6 +650,7 @@ asmlinkage void __init start_kernel(void)
 	vfs_caches_init_early();
 	cpuset_init_early();
 	page_cgroup_init();
+	init_smp_flush();
 	mem_init();
 	enable_debug_pagealloc();
 	cpu_hotplug_init();
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ