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]
Date:	Tue, 6 Dec 2011 01:40:28 -0800
From:	tip-bot for Ming Lei <tom.leiming@...il.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
	torvalds@...ux-foundation.org, a.p.zijlstra@...llo.nl,
	akpm@...ux-foundation.org, tglx@...utronix.de,
	yong.zhang0@...il.com, tom.leiming@...il.com, mingo@...e.hu
Subject: [tip:core/locking] init/main.c: Execute lockdep_init() as early as possible

Commit-ID:  73839c5b2eacc15cb0aa79c69b285fc659fa8851
Gitweb:     http://git.kernel.org/tip/73839c5b2eacc15cb0aa79c69b285fc659fa8851
Author:     Ming Lei <tom.leiming@...il.com>
AuthorDate: Thu, 17 Nov 2011 13:34:31 +0800
Committer:  Ingo Molnar <mingo@...e.hu>
CommitDate: Tue, 6 Dec 2011 08:16:53 +0100

init/main.c: Execute lockdep_init() as early as possible

This patch fixes a lockdep warning on ARM platforms:

  [    0.000000] WARNING: lockdep init error! Arch code didn't call lockdep_init() early enough?
  [    0.000000] Call stack leading to lockdep invocation was:
  [    0.000000]  [<c00164bc>] save_stack_trace_tsk+0x0/0x90
  [    0.000000]  [<ffffffff>] 0xffffffff

The warning is caused by printk inside smp_setup_processor_id().

It is safe to do this because lockdep_init() doesn't depend on
smp_setup_processor_id(), so improve things that printk can be
called as early as possible without lockdep complaint.

Signed-off-by: Ming Lei <tom.leiming@...il.com>
Reviewed-by: Yong Zhang <yong.zhang0@...il.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Link: http://lkml.kernel.org/r/1321508072-23853-1-git-send-email-tom.leiming@gmail.com
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
 init/main.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/init/main.c b/init/main.c
index 217ed23..2c76efb 100644
--- a/init/main.c
+++ b/init/main.c
@@ -469,13 +469,12 @@ asmlinkage void __init start_kernel(void)
 	char * command_line;
 	extern const struct kernel_param __start___param[], __stop___param[];
 
-	smp_setup_processor_id();
-
 	/*
 	 * Need to run as early as possible, to initialize the
 	 * lockdep hash:
 	 */
 	lockdep_init();
+	smp_setup_processor_id();
 	debug_objects_early_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