From: David Miller <davem@davemloft.net>
To: ebiederm@xmission.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] rtnl: Simplify ASSERT_RTNL
Date: Wed, 10 Oct 2007 21:16:54 -0700 (PDT) [thread overview]
Message-ID: <20071010.211654.85404234.davem@davemloft.net> (raw)
In-Reply-To: <m1r6ki9tib.fsf@ebiederm.dsl.xmission.com>
From: ebiederm@xmission.com (Eric W. Biederman)
Date: Fri, 28 Sep 2007 18:59:08 -0600
>
> Currently we have the call path:
> macvlan_open -> dev_unicast_add -> __dev_set_rx_mode ->
> __dev_set_promiscuity -> ASSERT_RTNL -> mutex_trylock
>
> When mutex debugging is on taking a mutex complains if we are not
> allowed to sleep. At that point we have called netif_tx_lock_bh
> so we are clearly not allowed to sleep. Arguably this is not a
> problem for mutex_trylock.
>
> However we can avoid the complaint and make the ASSERT_RTNL code
> cheaper, faster and more obvious by simply calling mutex_is_locked.
>
> So this patch adds rtnl_is_locked (which does mutex_is_locked on
> the rtnl_mutex) and changes ASSERT_RTNL to use that.
>
> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
There was a lot of discussion about how to do this right and
therefore you'll need to resubmit all of this with this
discussioned issues addressed.
next prev parent reply other threads:[~2007-10-11 4:16 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-29 0:59 [PATCH] rtnl: Simplify ASSERT_RTNL Eric W. Biederman
2007-09-29 4:31 ` Herbert Xu
2007-09-29 15:32 ` Patrick McHardy
2007-09-30 0:24 ` Herbert Xu
2007-09-30 15:47 ` Patrick McHardy
2007-10-02 9:28 ` Herbert Xu
2007-10-02 15:29 ` Patrick McHardy
2007-10-03 6:06 ` Herbert Xu
2007-10-08 4:40 ` Patrick McHardy
2007-09-29 17:18 ` Eric W. Biederman
2007-09-29 17:51 ` Patrick McHardy
2007-09-30 0:28 ` Herbert Xu
2007-10-11 4:16 ` David Miller [this message]
2007-10-11 6:57 ` Eric W. Biederman
2007-10-11 7:12 ` Herbert Xu
2007-10-11 8:23 ` Eric W. Biederman
2007-10-11 8:28 ` Herbert Xu
2007-10-11 16:33 ` Eric W. Biederman
2007-10-12 0:30 ` David Miller
2007-10-12 3:15 ` Eric W. Biederman
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=20071010.211654.85404234.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=ebiederm@xmission.com \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).