All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Jones <davej@redhat.com>
To: Linux Kernel <linux-kernel@vger.kernel.org>
Cc: cl@linux-foundation.org
Subject: Taint kernel when we detect a corrupted slab.
Date: Tue, 18 Sep 2012 11:05:44 -0400	[thread overview]
Message-ID: <20120918150543.GA14718@redhat.com> (raw)

It doesn't seem worth adding a new taint flag for this, so just re-use
the one from 'bad page'

Signed-off-by: Dave Jones <davej@redhat.com>

diff --git a/mm/slub.c b/mm/slub.c
index 2fdd96f..0c5009d 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, ...)

             reply	other threads:[~2012-09-18 15:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-18 15:05 Dave Jones [this message]
2012-09-18 16:57 ` Taint kernel when we detect a corrupted slab Christoph Lameter
2012-09-18 19:27   ` David Rientjes
2012-09-18 19:54     ` Dave Jones
2012-09-18 20:19       ` David Rientjes
2012-09-19  7:09         ` Pekka Enberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120918150543.GA14718@redhat.com \
    --to=davej@redhat.com \
    --cc=cl@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.