On Tue, Jun 27, 2006 at 10:09:08AM -0400, Peter Staubach wrote:
> Shouldn't this test for new_dev being NULL _before_ it gets used?
Indeed, it should. But the lock is inited in register_netdevice anyway.
I tested (compile+boot+ifconfig) the following patch to mm3, and the trace went
away.
Regards,
Frederik
Signed-Off-By: Frederik Deweerdt <[email protected]>
--- v2.6.17-mm3/net/8021q/vlan.c 2006-06-27 19:02:14.000000000 +0200
+++ v2.6.17-mm3~mod/net/8021q/vlan.c 2006-06-27 18:50:48.000000000 +0200
@@ -469,7 +469,6 @@ 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;
@@ -528,6 +527,8 @@ static struct net_device *register_vlan_
if (register_netdevice(new_dev))
goto out_free_newdev;
+ lockdep_set_class(&new_dev->_xmit_lock, &vlan_netdev_xmit_lock_key);
+
new_dev->iflink = real_dev->ifindex;
vlan_transfer_operstate(real_dev, new_dev);
linkwatch_fire_event(new_dev); /* _MUST_ call rfc2863_policy() */
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]