netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: David Miller <davem@davemloft.net>,
	akpm@linux-foundation.org, netdev@vger.kernel.org
Subject: Re: netlink locking warnings in 2.6.21-rc7-mm1
Date: Wed, 25 Apr 2007 15:17:39 +0200	[thread overview]
Message-ID: <462F54F3.9050306@trash.net> (raw)
In-Reply-To: <E1HgVxj-0003U6-00@gondolin.me.apana.org.au>

Herbert Xu wrote:
> David Miller <davem@davemloft.net> wrote:
> 
>>I think I see what might be the problem, nlk->cb_mutex is set
>>to "rtnl_mutex" and this is used for other purposes in various
>>code paths here, maybe there is a double mutex_unlock() or
>>similar due to that?
> 
> 
> Indeed, the RTNL is held during the processing of all RTNETLINK
> messages so we'd be trying to lock it recursively here which is
> not allowed.


No, it is released before calling netlink_dump_start().

> Actually I'm not quite sure what the benefit is for allowing an
> override CB mutex.  Since we still have to take it and we always
> allocate memory for a mutex anyway this would seem to be strictly
> worse than just using our own mutex.


The idea was that netlink families that don't want to consistently
hold the same mutex used for queue processing during the entire
dump operation can still have per-socket mutexes just to protect
the callback data and have concurrent dump continuations.


  reply	other threads:[~2007-04-25 13:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-24 19:42 netlink locking warnings in 2.6.21-rc7-mm1 Andrew Morton
2007-04-24 21:20 ` David Miller
2007-04-24 21:26   ` Andrew Morton
2007-04-25  1:06   ` Herbert Xu
2007-04-25 13:17     ` Patrick McHardy [this message]
2007-04-25 19:44       ` Andrew Morton
2007-04-25 20:51         ` Patrick McHardy
2007-04-25 21:01           ` David Miller
2007-04-25 23:48           ` Andrew Morton
2007-04-25 13:14   ` Patrick McHardy

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=462F54F3.9050306@trash.net \
    --to=kaber@trash.net \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --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).