Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0fe1e567d0b4f6a98e94d3b9a40f41c801bd157f
Commit:     0fe1e567d0b4f6a98e94d3b9a40f41c801bd157f
Parent:     0d89d7944fead211422e21fb7ea70ed3b903a79e
Author:     Jarek Poplawski <[EMAIL PROTECTED]>
AuthorDate: Thu Jan 10 22:38:31 2008 -0800
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Thu Jan 10 22:38:31 2008 -0800

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: Patrick McHardy <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 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;
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to