public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* 24rc8: unregister_netdevice: waiting for ... to become free. Usage count = 1?
@ 2008-01-23  6:42 Soeren Sonnenburg
  2008-01-23  6:44 ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Soeren Sonnenburg @ 2008-01-23  6:42 UTC (permalink / raw)
  To: Linux Kernel

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: 24rc8: unregister_netdevice: waiting for ... to become free. Usage count = 1?
  2008-01-23  6:42 24rc8: unregister_netdevice: waiting for ... to become free. Usage count = 1? Soeren Sonnenburg
@ 2008-01-23  6:44 ` David Miller
  2008-01-23  7:49   ` Soeren Sonnenburg
  2008-01-29  8:59   ` Soeren Sonnenburg
  0 siblings, 2 replies; 4+ messages in thread
From: David Miller @ 2008-01-23  6:44 UTC (permalink / raw)
  To: kernel; +Cc: linux-kernel

From: Soeren Sonnenburg <kernel@nn7.de>
Date: Wed, 23 Jan 2008 07:42:21 +0100

> 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.

Signed-off-by: David S. Miller <davem@davemloft.net>

diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index cc8a2f1..29b8ee4 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -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);
 }
 

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: 24rc8: unregister_netdevice: waiting for ... to become free. Usage count = 1?
  2008-01-23  6:44 ` David Miller
@ 2008-01-23  7:49   ` Soeren Sonnenburg
  2008-01-29  8:59   ` Soeren Sonnenburg
  1 sibling, 0 replies; 4+ messages in thread
From: Soeren Sonnenburg @ 2008-01-23  7:49 UTC (permalink / raw)
  To: David Miller; +Cc: linux-kernel

On Tue, 2008-01-22 at 22:44 -0800, David Miller wrote:
> From: Soeren Sonnenburg <kernel@nn7.de>
> Date: Wed, 23 Jan 2008 07:42:21 +0100
> 
> > 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:

Thank you very much for pointing this out!

git pull ; make ; ...
Soeren

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: 24rc8: unregister_netdevice: waiting for ... to become free. Usage count = 1?
  2008-01-23  6:44 ` David Miller
  2008-01-23  7:49   ` Soeren Sonnenburg
@ 2008-01-29  8:59   ` Soeren Sonnenburg
  1 sibling, 0 replies; 4+ messages in thread
From: Soeren Sonnenburg @ 2008-01-29  8:59 UTC (permalink / raw)
  To: David Miller; +Cc: linux-kernel

On Tue, 2008-01-22 at 22:44 -0800, David Miller wrote:
> From: Soeren Sonnenburg <kernel@nn7.de>
> Date: Wed, 23 Jan 2008 07:42:21 +0100
> 
> > 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:

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

Soeren

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-01-29 10:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-23  6:42 24rc8: unregister_netdevice: waiting for ... to become free. Usage count = 1? Soeren Sonnenburg
2008-01-23  6:44 ` David Miller
2008-01-23  7:49   ` Soeren Sonnenburg
2008-01-29  8:59   ` Soeren Sonnenburg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox