[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20060801230003.GB14863@martell.zuzino.mipt.ru>
Date: Wed, 2 Aug 2006 03:00:03 +0400
From: Alexey Dobriyan <adobriyan@...il.com>
To: Dave Jones <davej@...hat.com>, Alan Cox <alan@...rguk.ukuu.org.uk>,
Linux Kernel <linux-kernel@...r.kernel.org>
Subject: Re: single bit flip detector.
On Tue, Aug 01, 2006 at 06:36:22PM -0400, Dave Jones wrote:
> 000: 6b 6b 6b 6b 6a 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b
> --- a/mm/slab.c
> +++ b/mm/slab.c
> @@ -1638,10 +1638,29 @@ static void poison_obj(struct kmem_cache
> static void dump_line(char *data, int offset, int limit)
> {
> int i;
> + unsigned char total=0, bad_count=0;
" = 0"
> printk(KERN_ERR "%03x:", offset);
> - for (i = 0; i < limit; i++)
> + for (i = 0; i < limit; i++) {
> + if (data[offset+i] != POISON_FREE) {
" + i"
> + total += data[offset+i];
ditto
> + ++bad_count;
How about post increment?
> + }
> printk(" %02x", (unsigned char)data[offset + i]);
> + }
> printk("\n");
> +
> + if (bad_count == 1) {
> + errors = total ^ POISON_FREE;
undeclared "errors"
> + if ((errors && !(errors & (errors-1))) {
^^^
Turn on CONFIG_DEBUG_SLAB before compiling. ;-)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists