summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Jones <davej@redhat.com>2012-09-18 15:54:12 -0400
committerPekka Enberg <penberg@kernel.org>2012-09-19 10:08:01 +0300
commit645df230cacc48f4463037016e9dbd3633183fe8 (patch)
tree0c89db88d8ece26aba176c19166863c677529e09
parent947ca1856a7e60aa6d20536785e6a42dff25aa6e (diff)
downloadop-kernel-dev-645df230cacc48f4463037016e9dbd3633183fe8.zip
op-kernel-dev-645df230cacc48f4463037016e9dbd3633183fe8.tar.gz
mm, sl[au]b: Taint kernel when we detect a corrupted slab
It doesn't seem worth adding a new taint flag for this, so just re-use the one from 'bad page' Acked-by: Christoph Lameter <cl@linux.com> # SLUB Acked-by: David Rientjes <rientjes@google.com> Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
-rw-r--r--mm/slab.c1
-rw-r--r--mm/slub.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/mm/slab.c b/mm/slab.c
index cd5a926..5c6abb8 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -811,6 +811,7 @@ static void __slab_error(const char *function, struct kmem_cache *cachep,
printk(KERN_ERR "slab error in %s(): cache `%s': %s\n",
function, cachep->name, msg);
dump_stack();
+ add_taint(TAINT_BAD_PAGE);
}
/*
diff --git a/mm/slub.c b/mm/slub.c
index c67bd0a..a6d043e 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -568,6 +568,8 @@ static void slab_bug(struct kmem_cache *s, char *fmt, ...)
printk(KERN_ERR "BUG %s (%s): %s\n", s->name, print_tainted(), buf);
printk(KERN_ERR "----------------------------------------"
"-------------------------------------\n\n");
+
+ add_taint(TAINT_BAD_PAGE);
}
static void slab_fix(struct kmem_cache *s, char *fmt, ...)
OpenPOWER on IntegriCloud