aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2012-01-22 09:57:39 +0000
committerGabor Juhos <juhosg@openwrt.org>2012-01-22 09:57:39 +0000
commit8e662f28fe7d5ef31f749d7c6cb5aee5b33a6f28 (patch)
treeaf9ba8d58590a8ece79af9d5f5063e65006abe5c /target/linux
parent4625c9b5a4122f21b2415a32f930d58dbd74686b (diff)
downloadupstream-8e662f28fe7d5ef31f749d7c6cb5aee5b33a6f28.tar.gz
upstream-8e662f28fe7d5ef31f749d7c6cb5aee5b33a6f28.tar.bz2
upstream-8e662f28fe7d5ef31f749d7c6cb5aee5b33a6f28.zip
generic: 3.2: don't disable lockdep for OOT modules
SVN-Revision: 29846
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/generic/patches-3.2/030-lockdep-bug-Exclude-TAINT_FIRMWARE_WORKAROUND-from-d.patch47
-rw-r--r--target/linux/generic/patches-3.2/031-lockdep-bug-Exclude-TAINT_OOT_MODULE-from-disabling-.patch48
2 files changed, 95 insertions, 0 deletions
diff --git a/target/linux/generic/patches-3.2/030-lockdep-bug-Exclude-TAINT_FIRMWARE_WORKAROUND-from-d.patch b/target/linux/generic/patches-3.2/030-lockdep-bug-Exclude-TAINT_FIRMWARE_WORKAROUND-from-d.patch
new file mode 100644
index 0000000000..212a7a5171
--- /dev/null
+++ b/target/linux/generic/patches-3.2/030-lockdep-bug-Exclude-TAINT_FIRMWARE_WORKAROUND-from-d.patch
@@ -0,0 +1,47 @@
+From df754e6af2f237a6c020c0daff55a1a609338e31 Mon Sep 17 00:00:00 2001
+From: Peter Zijlstra <a.p.zijlstra@chello.nl>
+Date: Mon, 14 Nov 2011 13:13:49 +0100
+Subject: [PATCH 1/2] lockdep, bug: Exclude TAINT_FIRMWARE_WORKAROUND from disabling lockdep
+
+It's unlikely that TAINT_FIRMWARE_WORKAROUND causes false
+lockdep messages, so do not disable lockdep in that case.
+We still want to keep lockdep disabled in the
+TAINT_OOT_MODULE case:
+
+ - bin-only modules can cause various instabilities in
+ their and in unrelated kernel code
+
+ - they are impossible to debug for kernel developers
+
+ - they also typically do not have the copyright license
+ permission to link to the GPL-ed lockdep code.
+
+Suggested-by: Ben Hutchings <ben@decadent.org.uk>
+Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
+Link: http://lkml.kernel.org/n/tip-xopopjjens57r0i13qnyh2yo@git.kernel.org
+Signed-off-by: Ingo Molnar <mingo@elte.hu>
+---
+ kernel/panic.c | 12 ++++++++++--
+ 1 files changed, 10 insertions(+), 2 deletions(-)
+
+--- a/kernel/panic.c
++++ b/kernel/panic.c
+@@ -240,8 +240,16 @@ void add_taint(unsigned flag)
+ * Also we want to keep up lockdep for staging development and
+ * post-warning case.
+ */
+- if (flag != TAINT_CRAP && flag != TAINT_WARN && __debug_locks_off())
+- printk(KERN_WARNING "Disabling lock debugging due to kernel taint\n");
++ switch (flag) {
++ case TAINT_CRAP:
++ case TAINT_WARN:
++ case TAINT_FIRMWARE_WORKAROUND:
++ break;
++
++ default:
++ if (__debug_locks_off())
++ printk(KERN_WARNING "Disabling lock debugging due to kernel taint\n");
++ }
+
+ set_bit(flag, &tainted_mask);
+ }
diff --git a/target/linux/generic/patches-3.2/031-lockdep-bug-Exclude-TAINT_OOT_MODULE-from-disabling-.patch b/target/linux/generic/patches-3.2/031-lockdep-bug-Exclude-TAINT_OOT_MODULE-from-disabling-.patch
new file mode 100644
index 0000000000..398bb3ed23
--- /dev/null
+++ b/target/linux/generic/patches-3.2/031-lockdep-bug-Exclude-TAINT_OOT_MODULE-from-disabling-.patch
@@ -0,0 +1,48 @@
+From 9ec84acee1e221d99dc33237bff5e82839d10cc0 Mon Sep 17 00:00:00 2001
+From: Ben Hutchings <ben@decadent.org.uk>
+Date: Wed, 7 Dec 2011 14:30:58 +0000
+Subject: [PATCH 2/2] lockdep, bug: Exclude TAINT_OOT_MODULE from disabling lock debugging
+
+We do want to allow lock debugging for GPL-compatible modules
+that are not (yet) built in-tree. This was disabled as a
+side-effect of commit 2449b8ba0745327c5fa49a8d9acffe03b2eded69
+('module,bug: Add TAINT_OOT_MODULE flag for modules not built
+in-tree'). Lock debug warnings now include taint flags, so
+kernel developers should still be able to deflect warnings
+caused by out-of-tree modules.
+
+The TAINT_PROPRIETARY_MODULE flag for non-GPL-compatible modules
+will still disable lock debugging.
+
+Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
+Cc: Nick Bowler <nbowler@elliptictech.com>
+Cc: Greg KH <greg@kroah.com>
+Cc: Dave Jones <davej@redhat.com>
+Cc: Rusty Russell <rusty@rustcorp.com.au>
+Cc: Randy Dunlap <rdunlap@xenotime.net>
+Cc: Debian kernel maintainers <debian-kernel@lists.debian.org>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Cc: Alan Cox <alan@linux.intel.com>
+Link: http://lkml.kernel.org/r/1323268258.18450.11.camel@deadeye
+Signed-off-by: Ingo Molnar <mingo@elte.hu>
+---
+ kernel/panic.c | 5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+--- a/kernel/panic.c
++++ b/kernel/panic.c
+@@ -237,11 +237,12 @@ void add_taint(unsigned flag)
+ * Can't trust the integrity of the kernel anymore.
+ * We don't call directly debug_locks_off() because the issue
+ * is not necessarily serious enough to set oops_in_progress to 1
+- * Also we want to keep up lockdep for staging development and
+- * post-warning case.
++ * Also we want to keep up lockdep for staging/out-of-tree
++ * development and post-warning case.
+ */
+ switch (flag) {
+ case TAINT_CRAP:
++ case TAINT_OOT_MODULE:
+ case TAINT_WARN:
+ case TAINT_FIRMWARE_WORKAROUND:
+ break;