[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080501133209.2c04dad0@infradead.org>
Date: Thu, 1 May 2008 13:32:09 -0700
From: Arjan van de Ven <arjan@...radead.org>
To: Matthew Wilcox <matthew@....cx>
Cc: Linus Torvalds <torvalds@...l.org>, Andrew Morton <akpm@...l.org>,
linux-kernel@...r.kernel.org, Dave Jones <davej@...hat.com>
Subject: Re: [PATCH] Extend list debugging to cover hlists
On Fri, 2 May 2008 12:27:46 -0600
Matthew Wilcox <matthew@....cx> wrote:
> +void hlist_check(struct hlist_node *n)
> +{
> + if (unlikely(*n->pprev != n)) {
> + printk(KERN_ERR "hlist corruption. *pprev should be
> %p, "
> + "but was %p\n", n, *n->pprev);
> + BUG();
> + }
> + if (unlikely(n->next != NULL && n->next->pprev != &n->next))
> {
> + printk(KERN_ERR "hlist corruption. n->next->pprev
> should be"
> + "%p, but was %p\n", &n->next,
> n->next->pprev);
> + BUG();
> + }
> +}
> +EXPORT_SYMBOL(hlist_check);
>
Hi,
I like the concept of the patch; however...
BUG() is a tad on the rude side... how about WARN_ON(1) ?
--
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