mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arjan van de Ven <arjan@infradead.org>
To: Bill Nottingham <notting@redhat.com>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: lockdep: adding bonding device triggers warning
Date: Fri, 18 Aug 2006 14:46:28 +0200	[thread overview]
Message-ID: <1155905188.4494.177.camel@laptopd505.fenrus.org> (raw)
In-Reply-To: <20060815181103.GA9690@nostromo.devel.redhat.com>

On Tue, 2006-08-15 at 14:11 -0400, Bill Nottingham wrote:
> 2.6.17-1.2564.fc6 is 2.6.18rc4+.
> 
> Happened with 'echo "+bond0" > /sys/class/net/bonding_masters'
> 
> bonding: bond0 is being created...
> 
> =======================================================
> [ INFO: possible circular locking dependency detected ]
> 2.6.17-1.2564.fc6 #1
> -------------------------------------------------------
> bash/9497 is trying to acquire lock:
>  (rtnl_mutex){--..}, at: [<c0612860>] mutex_lock+0x21/0x24
> 
> but task is already holding lock:
>  (&bonding_rwsem){----}, at: [<f8c332e0>] bonding_store_bonds+0x28/0x1c6 [bonding]
> 
> which lock already depends on the new lock.


looks like a real deadlock:

SIOCSIFNAME ioctl takes  rtnl_lock() then calls dev_ifsioc which calls
dev_change_name which calls the netdev_chain notifier... which ends up
calling bond_event_changename() which does:
        down_write(&(bonding_rwsem));


on the other hand, bonding_store_bonds() does 
        down_write(&(bonding_rwsem));
then calls bond_create() which does:
int bond_create(char *name, struct bond_params *params, struct bonding
**newbond)
{
        struct net_device *bond_dev;
        int res;

        rtnl_lock();

since these both are global locks and not per device locks, this really
does look like an AB-BA deadlock to me....


-- 
if you want to mail me at work (you don't), use arjan (at) linux.intel.com


      reply	other threads:[~2006-08-18 12:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-15 18:11 Bill Nottingham
2006-08-18 12:46 ` Arjan van de Ven [this message]

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=1155905188.4494.177.camel@laptopd505.fenrus.org \
    --to=arjan@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=notting@redhat.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

all inboxes | Powered by JetHome®