From: Stephen Hemminger Date: Mon, 9 Aug 2004 09:36:44 +0000 (-0700) Subject: [VLAN]: Fix device refcount bug. X-Git-Tag: v2.6.8~16^2^2~6 X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=22b11292dec64f44325c2ad3f968114d7975c7f2;p=history.git [VLAN]: Fix device refcount bug. 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 Signed-off-by: David S. Miller --- diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c index ba7c638668fc..df99704107b2 100644 --- a/net/8021q/vlan.c +++ b/net/8021q/vlan.c @@ -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? */