From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: linux-kernel <linux-kernel@vger.kernel.org>,
netdev <netdev@vger.kernel.org>
Cc: Andrew Morton <akpm@osdl.org>, Ingo Molnar <mingo@elte.hu>,
"John W. Linville" <linville@tuxdriver.com>,
Chad Tindel <ctindel@users.sourceforge.net>,
Jay Vosburgh <fubar@us.ibm.com>
Subject: [PATCH] bonding: lockdep annotation
Date: Thu, 28 Sep 2006 11:42:41 +0200 [thread overview]
Message-ID: <1159436561.28131.37.camel@taijtu> (raw)
=============================================
[ INFO: possible recursive locking detected ]
2.6.17-1.2600.fc6 #1
---------------------------------------------
ifconfig/2411 is trying to acquire lock:
(&dev->_xmit_lock){-...}, at: [<ffffffff80429b9f>] dev_mc_add+0x45/0x15f
but task is already holding lock:
(&dev->_xmit_lock){-...}, at: [<ffffffff80429b9f>] dev_mc_add+0x45/0x15f
other info that might help us debug this:
3 locks held by ifconfig/2411:
#0: (rtnl_mutex){--..}, at: [<ffffffff802664af>] mutex_lock+0x2a/0x2e
#1: (&dev->_xmit_lock){-...}, at: [<ffffffff80429b9f>] dev_mc_add+0x45/0x15f
#2: (&bond->lock){-.-+}, at: [<ffffffff8831b7f7>] bond_set_multicast_list+0x2c/0x26a [bonding]
stack backtrace:
Call Trace:
[<ffffffff8026e97d>] show_trace+0xae/0x319
[<ffffffff8026ebfd>] dump_stack+0x15/0x17
[<ffffffff802a839b>] __lock_acquire+0x135/0xa64
[<ffffffff802a926d>] lock_acquire+0x4b/0x69
[<ffffffff80267981>] _spin_lock_bh+0x2a/0x36
[<ffffffff80429b9f>] dev_mc_add+0x45/0x15f
[<ffffffff8831b903>] :bonding:bond_set_multicast_list+0x138/0x26a
[<ffffffff80429901>] __dev_mc_upload+0x22/0x24
[<ffffffff80429c74>] dev_mc_add+0x11a/0x15f
[<ffffffff8045d154>] igmp_group_added+0x55/0x10f
[<ffffffff8045d4ab>] ip_mc_inc_group+0x1d6/0x21a
[<ffffffff8045d535>] ip_mc_up+0x46/0x61
[<ffffffff804594b8>] inetdev_init+0x11c/0x136
[<ffffffff8045a0b7>] devinet_ioctl+0x3eb/0x5e9
[<ffffffff8045a56c>] inet_ioctl+0x71/0x8f
[<ffffffff8041ed74>] sock_ioctl+0x1e8/0x20a
[<ffffffff80243ae0>] do_ioctl+0x2a/0x77
[<ffffffff802325cc>] vfs_ioctl+0x25a/0x277
[<ffffffff8024ea4b>] sys_ioctl+0x5f/0x82
[<ffffffff8026060e>] system_call+0x7e/0x83
The bonding driver nests other drivers, give the bonding driver its own
lock class.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Ingo Molnar <mingo@elte.hu>
---
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 0fb5f65..ebbf002 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -4692,6 +4692,8 @@ static int bond_check_params(struct bond
return 0;
}
+static struct lock_class_key bonding_netdev_xmit_lock_key;
+
/* Create a new bond based on the specified name and bonding parameters.
* Caller must NOT hold rtnl_lock; we need to release it here before we
* set up our sysfs entries.
@@ -4727,6 +4729,9 @@ int bond_create(char *name, struct bond_
if (res < 0) {
goto out_bond;
}
+
+ lockdep_set_class(&bond_dev->_xmit_lock, &bonding_netdev_xmit_lock_key);
+
if (newbond)
*newbond = bond_dev->priv;
reply other threads:[~2006-09-28 9:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1159436561.28131.37.camel@taijtu \
--to=a.p.zijlstra@chello.nl \
--cc=akpm@osdl.org \
--cc=ctindel@users.sourceforge.net \
--cc=fubar@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=mingo@elte.hu \
--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