Skip to contentSkip to conversation

24rc8: unregister_netdevice: waiting for ... to become free. Usage count = 1?

DISCUSSION Soeren Sonnenburg 2 participants 4 messages Jan 23, 2008 – Jan 29, 2008 Networking

lore
Share & tools
lore
#0 lore raw

Dear all,

since some 2.6.24rc version I suddenly experience such messages on console when trying to shutdown a vpn connection:

unregister_netdevice: waiting for tun0 to become free. Usage count = 1

or when removing an usb wlan dongle (although it was ifconfig wlan0 down'd before)

unregister_netdevice: waiting for wlan0 to become free. Usage count = 1

Then only when all potential connections going over that iface are gone these messages disappear (sometimes this does not happen and the kernel then hangs on reboot...)

Is this intended?

Soeren

maintainer
#1 lore raw

From: Soeren Sonnenburg <[email protected]>
Date: Wed, 23 Jan 2008 07:42:21 +0100

Quoted 9 lines

Dear all,

since some 2.6.24rc version I suddenly experience such messages on console when trying to shutdown a vpn connection:

unregister_netdevice: waiting for tun0 to become free. Usage count = 1

or when removing an usb wlan dongle (although it was ifconfig wlan0 down'd before)

Current GIT already has a fix for this, attached below:

[NEIGH]: Revert 'Fix race between neigh_parms_release and neightbl_fill_parms'

Commit 9cd40029423701c376391da59d2c6469672b4bed (Fix race between neigh_parms_release and neightbl_fill_parms) introduced device reference counting regressions for several people, see:

	http://bugzilla.kernel.org/show_bug.cgi?id=9778

for example.

net/core/neighbour.c +2 -2
index cc8a2f1..29b8ee4 100644
@@ -1316,6 +1316,8 @@ void neigh_parms_release(struct neigh_table *tbl, struct neigh_parms *parms)
 			*p = parms->next;
 			parms->dead = 1;
 			write_unlock_bh(&tbl->lock);
+			if (parms->dev)
+				dev_put(parms->dev);
 			call_rcu(&parms->rcu_head, neigh_rcu_free_parms);
 			return;
 		}
@@ -1326,8 +1328,6 @@ void neigh_parms_release(struct neigh_table *tbl, struct neigh_parms *parms)
 
 void neigh_parms_destroy(struct neigh_parms *parms)
 {
-	if (parms->dev)
-		dev_put(parms->dev);
 	kfree(parms);
 }
 
#2 lore raw
Quoted 8 lines · David Miller

From: Soeren Sonnenburg <[email protected]>
Date: Wed, 23 Jan 2008 07:42:21 +0100

Quoted 5 lines

Dear all,

since some 2.6.24rc version I suddenly experience such messages on console when trying to shutdown a vpn connection:

Quoted 6 lines
Quoted 4 lines

unregister_netdevice: waiting for tun0 to become free. Usage count = 1

or when removing an usb wlan dongle (although it was ifconfig wlan0 down'd before)

Current GIT already has a fix for this, attached below:

Thank you very much for pointing this out!

git pull ; make ; ...
Soeren

#3 lore raw
In reply to David Miller
Quoted 8 lines · David Miller

From: Soeren Sonnenburg <[email protected]>
Date: Wed, 23 Jan 2008 07:42:21 +0100

Quoted 5 lines

Dear all,

since some 2.6.24rc version I suddenly experience such messages on console when trying to shutdown a vpn connection:

Quoted 6 lines
Quoted 4 lines

unregister_netdevice: waiting for tun0 to become free. Usage count = 1

or when removing an usb wlan dongle (although it was ifconfig wlan0 down'd before)

Current GIT already has a fix for this, attached below:

hmmhhh, I am still seeing this problem on 2.6.24 with at least with the madwifi driver...

Soeren