public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Michael Buesch <mb@bu3sch.de>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: paulmck@linux.vnet.ibm.com,
	Herbert Xu <herbert@gondor.apana.org.au>,
	satyam@infradead.org, flo@rfc822.org,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	linux-wireless@vger.kernel.org, michal.k.k.piotrowski@gmail.com,
	ipw3945-devel@lists.sourceforge.net, yi.zhu@intel.com,
	flamingice@sourmilk.net
Subject: Re: BUG: scheduling while atomic: ifconfig/0x00000002/4170
Date: Fri, 7 Sep 2007 18:01:34 +0200	[thread overview]
Message-ID: <200709071801.34909.mb@bu3sch.de> (raw)
In-Reply-To: <1189171635.28781.134.camel@johannes.berg>

On Friday 07 September 2007, Johannes Berg wrote:
> On Thu, 2007-09-06 at 08:46 -0700, Paul E. McKenney wrote:
> 
> > Looks good to me from an RCU viewpoint.  I cannot claim familiarity with
> > this code.  I therefore especially like the indications of where RTNL
> > is held and not!!!
> 
> :)
> 
> > Some questions below based on a quick scan.  And a global question:
> > should the comments about RTNL being held be replaced by ASSERT_RTNL()?
> 
> I don't like ASSERT_RTNL() much because it actually tries to lock it.
> I'd be much happer if it was WARN_ON(!mutex_locked(&rtnl_mutex)) or
> something equivalent.

What's the problem with trying to lock it?
In the paths where you insert this assertion, you will be locked.
So the trylock will fail and not cause any blocking or something else.
It's basically not more expensive than your mutex_locked test.
And the !mutex_locked test might not work on UP (Not sure, about
the current implementation.)

  parent reply	other threads:[~2007-09-07 16:02 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-02 18:44 BUG: scheduling while atomic: ifconfig/0x00000002/4170 Florian Lohoff
2007-09-02 23:59 ` Michal Piotrowski
2007-09-06  5:02   ` Satyam Sharma
2007-09-06  8:20     ` Herbert Xu
2007-09-06  8:23     ` Herbert Xu
2007-09-06  8:41       ` Satyam Sharma
2007-09-06  8:38         ` Florian Lohoff
2007-09-06 12:09       ` Johannes Berg
2007-09-06 12:36         ` Herbert Xu
2007-09-06 12:44           ` Johannes Berg
2007-09-06 13:36           ` Johannes Berg
2007-09-06 15:46             ` Paul E. McKenney
2007-09-07 13:27               ` Johannes Berg
2007-09-07 14:25                 ` Paul E. McKenney
2007-09-07 14:30                   ` Johannes Berg
2007-09-07 14:35                   ` Johannes Berg
2007-09-07 14:38                   ` [RFC] mac80211: fix virtual interface locking Johannes Berg
2007-09-07 16:01                 ` Michael Buesch [this message]
2007-09-07 19:17                   ` BUG: scheduling while atomic: ifconfig/0x00000002/4170 Johannes Berg
2007-09-06 12:52         ` Satyam Sharma
2007-09-06 12:46           ` Johannes Berg
2007-09-06 15:19       ` Johannes Berg
2007-09-12 12:34         ` David Miller
2007-09-13  7:16           ` Johannes Berg

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=200709071801.34909.mb@bu3sch.de \
    --to=mb@bu3sch.de \
    --cc=flamingice@sourmilk.net \
    --cc=flo@rfc822.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=ipw3945-devel@lists.sourceforge.net \
    --cc=johannes@sipsolutions.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=michal.k.k.piotrowski@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=satyam@infradead.org \
    --cc=yi.zhu@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox