提交 645df230 编写于 作者: D Dave Jones 提交者: Pekka Enberg

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: NDavid Rientjes <rientjes@google.com>
Signed-off-by: NDave Jones <davej@redhat.com>
Signed-off-by: NPekka Enberg <penberg@kernel.org>
上级 947ca185
...@@ -811,6 +811,7 @@ static void __slab_error(const char *function, struct kmem_cache *cachep, ...@@ -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", printk(KERN_ERR "slab error in %s(): cache `%s': %s\n",
function, cachep->name, msg); function, cachep->name, msg);
dump_stack(); dump_stack();
add_taint(TAINT_BAD_PAGE);
} }
/* /*
......
...@@ -568,6 +568,8 @@ static void slab_bug(struct kmem_cache *s, char *fmt, ...) ...@@ -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 "BUG %s (%s): %s\n", s->name, print_tainted(), buf);
printk(KERN_ERR "----------------------------------------" printk(KERN_ERR "----------------------------------------"
"-------------------------------------\n\n"); "-------------------------------------\n\n");
add_taint(TAINT_BAD_PAGE);
} }
static void slab_fix(struct kmem_cache *s, char *fmt, ...) static void slab_fix(struct kmem_cache *s, char *fmt, ...)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册