From: Arjan van de Ven <arjan@linux.intel.com>
To: deweerdt@free.fr
Cc: greearb@candelatech.com, mingo@redhat.com,
linux-kernel@vger.kernel.org, akpm@osdl.org
Subject: [patch] lockdep annotate vlan net device as being a special class
Date: Mon, 26 Jun 2006 16:01:24 +0200 [thread overview]
Message-ID: <1151330484.3185.42.camel@laptopd505.fenrus.org> (raw)
In-Reply-To: <1150382401.449171412bdfe@imp1-g19.free.fr>
On Thu, 2006-06-15 at 16:40 +0200, deweerdt@free.fr wrote:
> Hi,
>
> Assigning an inet address to a vlanized interface triggered the following BUG
> from the lock validator (kernel is 2.6.17-rc6-mm2):
ok below is a real working (cross my fingers) patch against the current
-mm tree:
vlan network devices have devices nesting below it, and are a special
"super class" of normal network devices; split their locks off into a
separate class since they always nest.
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
net/8021q/vlan.c | 10 ++++++++++
1 file changed, 10 insertions(+)
Index: linux-2.6.17-lockdep/net/8021q/vlan.c
===================================================================
--- linux-2.6.17-lockdep.orig/net/8021q/vlan.c
+++ linux-2.6.17-lockdep/net/8021q/vlan.c
@@ -364,6 +364,14 @@ static void vlan_transfer_operstate(cons
}
}
+/*
+ * vlan network devices have devices nesting below it, and are a special
+ * "super class" of normal network devices; split their locks off into a
+ * separate class since they always nest.
+ */
+static struct lock_class_key vlan_netdev_xmit_lock_key;
+
+
/* Attach a VLAN device to a mac address (ie Ethernet Card).
* Returns the device that was created, or NULL if there was
* an error of some kind.
@@ -460,6 +468,8 @@ static struct net_device *register_vlan_
new_dev = alloc_netdev(sizeof(struct vlan_dev_info), name,
vlan_setup);
+
+ lockdep_set_class(&new_dev->_xmit_lock, &vlan_netdev_xmit_lock_key);
if (new_dev == NULL)
goto out_unlock;
next prev parent reply other threads:[~2006-06-26 14:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-15 14:40 lock validator: false positive in vlan_dev.c deweerdt
2006-06-26 14:01 ` Arjan van de Ven [this message]
2006-06-27 14:09 ` [patch] lockdep annotate vlan net device as being a special class Peter Staubach
2006-06-27 15:08 ` Frederik Deweerdt
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=1151330484.3185.42.camel@laptopd505.fenrus.org \
--to=arjan@linux.intel.com \
--cc=akpm@osdl.org \
--cc=deweerdt@free.fr \
--cc=greearb@candelatech.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@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®