]> git.neil.brown.name Git - history.git/commitdiff
[VLAN]: Fix device refcount bug.
authorStephen Hemminger <shemminger@osdl.org>
Mon, 9 Aug 2004 09:36:44 +0000 (02:36 -0700)
committerStephen Hemminger <shemminger@osdl.org>
Mon, 9 Aug 2004 09:36:44 +0000 (02:36 -0700)
If you rmmod a network device that is in a vlan, the system hangs waiting
for the refcount to go to zero, because it is -1.  The problem is that the
vlan notifier does an extra dev_put in NETDEV_UNREGISTER case of notifier.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@redhat.com>
net/8021q/vlan.c

index ba7c638668fcde7be2270d1d91aa0f2ba8194fef..df99704107b202a91d1ddb98b12b36f0c02e14ab 100644 (file)
@@ -625,7 +625,6 @@ static int vlan_device_event(struct notifier_block *unused, unsigned long event,
                        ret = unregister_vlan_dev(dev,
                                                  VLAN_DEV_INFO(vlandev)->vlan_id);
 
-                       dev_put(vlandev);
                        unregister_netdevice(vlandev);
 
                        /* Group was destroyed? */