netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, kaber@trash.net
Subject: Re: netlink locking warnings in 2.6.21-rc7-mm1
Date: Tue, 24 Apr 2007 14:26:40 -0700	[thread overview]
Message-ID: <20070424142640.eedffa9d.akpm@linux-foundation.org> (raw)
In-Reply-To: <20070424.142008.35506725.davem@davemloft.net>

On Tue, 24 Apr 2007 14:20:08 -0700 (PDT) David Miller <davem@davemloft.net> wrote:

> From: Andrew Morton <akpm@linux-foundation.org>
> Date: Tue, 24 Apr 2007 12:42:50 -0700
> 
> > void debug_mutex_unlock(struct mutex *lock)
> > {
> > 	if (unlikely(!debug_locks))
> > 		return;
> > 
> > -->	DEBUG_LOCKS_WARN_ON(lock->owner != current_thread_info());
> > 	DEBUG_LOCKS_WARN_ON(lock->magic != lock);
> > 
> > so it's complaining that cb_mutex is being release by a thread other than
> > the one which acquired it.  I'm unable to reproduce it with their config,
> > naturally.
> 
> Is it illegal to sleep with a mutex held?

Nope.  Otherwise we'd use spinlocks everywhere ;)

> 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?

ooh, this might explain my mysterious ASSERT_RTNL failures, perhaps.
Am ready to test a patch.

  reply	other threads:[~2007-04-24 21:26 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 [this message]
2007-04-25  1:06   ` Herbert Xu
2007-04-25 13:17     ` Patrick McHardy
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=20070424142640.eedffa9d.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=kaber@trash.net \
    --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).