[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20071217075755.GA2128@ff.dom.local>
Date: Mon, 17 Dec 2007 08:57:55 +0100
From: Jarek Poplawski <jarkao2@...il.com>
To: Herbert Xu <herbert@...dor.apana.org.au>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
David Miller <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [patch 2/4] net: use mutex_is_locked() for ASSERT_RTNL()
On Mon, Dec 17, 2007 at 03:31:33PM +0800, Herbert Xu wrote:
> On Mon, Dec 17, 2007 at 08:26:01AM +0100, Jarek Poplawski wrote:
> >
> > Btw. #2: David Miller gave this example of ASSERT_RTNL use:
> >
> > ASSERT_RTNL();
> > page = alloc_page(GFP_KERNEL);
> >
> > But isn't there a debugging duplication: it seems alloc_page() is used
> > in so many places and this check for GFP is/should_be there already?
>
> On some paths this may be buried a conditional. Also if you
> replace it with a mutex_is_locked without the may_sleep it won't
> catch the case that started all this, namely the promiscuous path.
>
Right! There is only a question how much is such cases vs. checked
already, because then a might_sleep is really more readable when
added explicitly.
Jarek P.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists