summaryrefslogtreecommitdiffstats
path: root/linux-2.6-debug-taint-vm.patch
diff options
context:
space:
mode:
Diffstat (limited to 'linux-2.6-debug-taint-vm.patch')
-rw-r--r--linux-2.6-debug-taint-vm.patch65
1 files changed, 65 insertions, 0 deletions
diff --git a/linux-2.6-debug-taint-vm.patch b/linux-2.6-debug-taint-vm.patch
new file mode 100644
index 000000000..ee367d45a
--- /dev/null
+++ b/linux-2.6-debug-taint-vm.patch
@@ -0,0 +1,65 @@
+From b04c57d9dc889462951312be2ac81ff6c702e954 Mon Sep 17 00:00:00 2001
+From: Kyle McMartin <kyle@phobos.i.jkkm.org>
+Date: Wed, 8 Jul 2009 13:05:09 -0400
+Subject: [PATCH 3/6] fedora: linux-2.6-debug-taint-vm.patch
+
+---
+ kernel/panic.c | 4 +++-
+ mm/slab.c | 8 ++++----
+ mm/slub.c | 2 +-
+ 4 files changed, 11 insertions(+), 8 deletions(-)
+
+diff --git a/kernel/panic.c b/kernel/panic.c
+index 984b3ec..6d1c3be 100644
+--- a/kernel/panic.c
++++ b/kernel/panic.c
+@@ -199,6 +199,7 @@ const char *print_tainted(void)
+
+ return buf;
+ }
++EXPORT_SYMBOL(print_tainted);
+
+ int test_taint(unsigned flag)
+ {
+diff --git a/mm/slab.c b/mm/slab.c
+index e74a16e..7bc287e 100644
+--- a/mm/slab.c
++++ b/mm/slab.c
+@@ -1803,8 +1803,8 @@ static void check_poison_obj(struct kmem_cache *cachep, void *objp)
+ /* Print header */
+ if (lines == 0) {
+ printk(KERN_ERR
+- "Slab corruption: %s start=%p, len=%d\n",
+- cachep->name, realobj, size);
++ "Slab corruption (%s): %s start=%p, len=%d\n",
++ print_tainted(), cachep->name, realobj, size);
+ print_objinfo(cachep, objp, 0);
+ }
+ /* Hexdump the affected line */
+@@ -2902,8 +2902,8 @@ static void check_slabp(struct kmem_cache *cachep, struct slab *slabp)
+ if (entries != cachep->num - slabp->inuse) {
+ bad:
+ printk(KERN_ERR "slab: Internal list corruption detected in "
+- "cache '%s'(%d), slabp %p(%d). Hexdump:\n",
+- cachep->name, cachep->num, slabp, slabp->inuse);
++ "cache '%s'(%d), slabp %p(%d). Tainted(%s). Hexdump:\n",
++ cachep->name, cachep->num, slabp, slabp->inuse, print_tainted());
+ for (i = 0;
+ i < sizeof(*slabp) + cachep->num * sizeof(kmem_bufctl_t);
+ i++) {
+diff --git a/mm/slub.c b/mm/slub.c
+index 819f056..8eff0f4 100644
+--- a/mm/slub.c
++++ b/mm/slub.c
+@@ -433,7 +433,7 @@ static void slab_bug(struct kmem_cache *s, char *fmt, ...)
+ va_end(args);
+ printk(KERN_ERR "========================================"
+ "=====================================\n");
+- printk(KERN_ERR "BUG %s: %s\n", s->name, buf);
++ printk(KERN_ERR "BUG %s (%s): %s\n", s->name, print_tainted(), buf);
+ printk(KERN_ERR "----------------------------------------"
+ "-------------------------------------\n\n");
+ }
+--
+1.6.2.5
+