[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20071214083037.GA15602@gondor.apana.org.au>
Date: Fri, 14 Dec 2007 16:30:37 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [patch 2/4] net: use mutex_is_locked() for ASSERT_RTNL()
On Fri, Dec 14, 2007 at 12:22:09AM -0800, Andrew Morton wrote:
>
> I don't see how it could warn about that. Nor should it - one might want
> to check that rtnl_lock is held inside preempt_disable() or spin_lock or
> whatever.
>
> It might make sense to warn if ASSERT_RTNL is called in in_interrupt()
> contexts though.
Well the paths where ASSERT_RTNL is used should never be in an
atomic context. In the past it has been quite useful in pointing
out bogus locking practices.
There is currently one path where it's known to warn because of
this and it (promiscuous mode) is on my todo list.
Oh and it only warns when you have mutex debugging enabled.
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
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