From mboxrd@z Thu Jan 1 00:00:00 1970 From: Patrick McHardy Subject: [NETFILTER]: ip6t_eui64: Fixes calculation of Universal/Local bit Date: Thu, 10 Jan 2008 16:45:37 +0100 Message-ID: <47863DA1.8090907@trash.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------080908040905020405070008" Cc: Netfilter Development Mailinglist To: "David S. Miller" Return-path: Received: from stinky.trash.net ([213.144.137.162]:57594 "EHLO stinky.trash.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755819AbYAJPuC (ORCPT ); Thu, 10 Jan 2008 10:50:02 -0500 Sender: netfilter-devel-owner@vger.kernel.org List-ID: This is a multi-part message in MIME format. --------------080908040905020405070008 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit --------------080908040905020405070008 Content-Type: text/x-patch; name="01.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="01.diff" [VLAN]: nested VLAN: fix lockdep's recursive locking warning Allow vlans nesting other vlans without lockdep's warnings (max. 2 levels i.e. parent + child). Thanks to Patrick McHardy for pointing a bug in the first version of this patch. Reported-by: Benny Amorsen Signed-off-by: Jarek Poplawski Signed-off-by: Patrick McHardy --- commit 4d14fded63dcaf9d5dcf78e2a8ea3f5de2c29eb9 tree 2f0792e8240151b1e5437b05130d1f569175f572 parent e2474f60798c97f5c05d29a906045dd1f416ba7f author Jarek Poplawski Thu, 10 Jan 2008 16:25:00 +0100 committer Patrick McHardy Thu, 10 Jan 2008 16:25:00 +0100 net/8021q/vlan.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c index 4add9bd..032bf44 100644 --- a/net/8021q/vlan.c +++ b/net/8021q/vlan.c @@ -323,6 +323,7 @@ static const struct header_ops vlan_header_ops = { static int vlan_dev_init(struct net_device *dev) { struct net_device *real_dev = VLAN_DEV_INFO(dev)->real_dev; + int subclass = 0; /* IFF_BROADCAST|IFF_MULTICAST; ??? */ dev->flags = real_dev->flags & ~IFF_UP; @@ -349,7 +350,11 @@ static int vlan_dev_init(struct net_device *dev) dev->hard_start_xmit = vlan_dev_hard_start_xmit; } - lockdep_set_class(&dev->_xmit_lock, &vlan_netdev_xmit_lock_key); + if (real_dev->priv_flags & IFF_802_1Q_VLAN) + subclass = 1; + + lockdep_set_class_and_subclass(&dev->_xmit_lock, + &vlan_netdev_xmit_lock_key, subclass); return 0; } --------------080908040905020405070008--