398bb3ed23e3e8431256069777456493f58225fd
[openwrt/svn-archive/archive.git] / target / linux / generic / patches-3.2 / 031-lockdep-bug-Exclude-TAINT_OOT_MODULE-from-disabling-.patch
1 From 9ec84acee1e221d99dc33237bff5e82839d10cc0 Mon Sep 17 00:00:00 2001
2 From: Ben Hutchings <ben@decadent.org.uk>
3 Date: Wed, 7 Dec 2011 14:30:58 +0000
4 Subject: [PATCH 2/2] lockdep, bug: Exclude TAINT_OOT_MODULE from disabling lock debugging
5
6 We do want to allow lock debugging for GPL-compatible modules
7 that are not (yet) built in-tree. This was disabled as a
8 side-effect of commit 2449b8ba0745327c5fa49a8d9acffe03b2eded69
9 ('module,bug: Add TAINT_OOT_MODULE flag for modules not built
10 in-tree'). Lock debug warnings now include taint flags, so
11 kernel developers should still be able to deflect warnings
12 caused by out-of-tree modules.
13
14 The TAINT_PROPRIETARY_MODULE flag for non-GPL-compatible modules
15 will still disable lock debugging.
16
17 Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
18 Cc: Nick Bowler <nbowler@elliptictech.com>
19 Cc: Greg KH <greg@kroah.com>
20 Cc: Dave Jones <davej@redhat.com>
21 Cc: Rusty Russell <rusty@rustcorp.com.au>
22 Cc: Randy Dunlap <rdunlap@xenotime.net>
23 Cc: Debian kernel maintainers <debian-kernel@lists.debian.org>
24 Cc: Peter Zijlstra <peterz@infradead.org>
25 Cc: Alan Cox <alan@linux.intel.com>
26 Link: http://lkml.kernel.org/r/1323268258.18450.11.camel@deadeye
27 Signed-off-by: Ingo Molnar <mingo@elte.hu>
28 ---
29 kernel/panic.c | 5 +++--
30 1 files changed, 3 insertions(+), 2 deletions(-)
31
32 --- a/kernel/panic.c
33 +++ b/kernel/panic.c
34 @@ -237,11 +237,12 @@ void add_taint(unsigned flag)
35 * Can't trust the integrity of the kernel anymore.
36 * We don't call directly debug_locks_off() because the issue
37 * is not necessarily serious enough to set oops_in_progress to 1
38 - * Also we want to keep up lockdep for staging development and
39 - * post-warning case.
40 + * Also we want to keep up lockdep for staging/out-of-tree
41 + * development and post-warning case.
42 */
43 switch (flag) {
44 case TAINT_CRAP:
45 + case TAINT_OOT_MODULE:
46 case TAINT_WARN:
47 case TAINT_FIRMWARE_WORKAROUND:
48 break;