From: Arjan van de Ven 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 Signed-off-by: Ingo Molnar Signed-off-by: Andrew Morton --- net/8021q/vlan.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff -puN net/8021q/vlan.c~lockdep-annotate-vlan-net-device-as-being-a-special-class net/8021q/vlan.c --- a/net/8021q/vlan.c~lockdep-annotate-vlan-net-device-as-being-a-special-class +++ a/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; _