Skip to contentSkip to conversation

24rc8: unregister_netdevice: waiting for ... to become free

DISCUSSION Roland 2 participants 3 messages May 2, 2008 – May 4, 2008

Subsystems (3)
lore
Share & tools
lore

Roland

author
#0 lore raw
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines

i`m also seeing this one, but with pcnet32 - "modprobe -r pcnet32" never returns and

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

being printed over and over again

lsmod |grep pcnet32 shows

Quoted 8 lines
Quoted 8 lines
Quoted 6 lines

pcnet32 35828 0
mii 9344 1 pcnet32

i see stale ssh connection on port 22 and sshd for that session remains unkillable process.

here a bug

it seems it`s lapbether driver

reproduce:

on system with pcnet32 (vmware) do

modprobe pcnet32
modprobe lapbether
modprobe -r lapbether
modprobe -r pcnet32 -> hang -> unregister_netdevice: waiting for eth0 to become free

didnt try with other nics, but i assume it`s independent from pcnet32

MODULE_AUTHOR("Jonathan Naylor <[email protected]>"); MODULE_DESCRIPTION("The unofficial LAPB over Ethernet driver"); MODULE_LICENSE("GPL");

ok, experimental one, so not a real problem, but CC`ing the Author.

regards
roland

----- Original Message ----- From: "Roland" <[email protected]>
To: ""Soeren Sonnenburg"" <[email protected]>
Cc: <[email protected]>; <[email protected]>; ""Andrew Morton"" <[email protected]>
Sent: Friday, May 02, 2008 11:31 AM
Subject: Re: 24rc8: unregister_netdevice: waiting for ... to become free

Quoted 83 lines
Quoted 4 lines

I am not exactly sure which kernel version Roland (?) is/was using but from what I can tell this bug is fixed since 2.6.24 (at least). Well I didn't see it with madwifi nor with the tun devices anymore on any of the 24.X or 25rc's/25 ...

pardon, 2.6.25-git17 in vmware

Quoted 1 line

; <[email protected]>;

List:       linux-kernel
Subject:    Re: 24rc8: unregister_netdevice: waiting for ... to become free.
From:       Soeren Sonnenburg <kernel () nn7 ! de>
Date:       2008-05-02 6:15:43
Message-ID: 1209708943.23075.52.camel () localhost

[Download message RAW]

Quoted 50 lines · Andrew Morton
Quoted 7 lines · On Fri, 2 May 2008 03:26:28 +0200 "Roland" <[email protected]> wrote:

i`m also seeing this one, but with pcnet32 - "modprobe -r pcnet32" never returns and

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

being printed over and over again

Quoted 8 lines

lsmod |grep pcnet32 shows

pcnet32 35828 0
mii 9344 1 pcnet32

i see stale ssh connection on port 22 and sshd for that session remains unkillable process.

here a bug

Quoted 23 lines

List:       linux-kernel
Subject:    Re: 24rc8: unregister_netdevice: waiting for ... to become free.
From:       Soeren Sonnenburg <kernel () nn7 ! de>
Date:       2008-01-29 8:59:10
Message-ID: 1201597150.4973.10.camel () localhost

[Download message RAW]

Quoted 13 lines · David Miller

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)

Quoted 6 lines
Quoted 1 line

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

Quoted 8 lines

there a bug.

Let's cc [email protected] - linux-net is dead, afaik.

Thanks for reporting all these bugs but please do take much mure care over the cc's. Be sure to cc every party who was cc'ed on the email to which you're replying. I restored Soeren.

I am not exactly sure which kernel version Roland (?) is/was using but from what I can tell this bug is fixed since 2.6.24 (at least). Well I didn't see it with madwifi nor with the tun devices anymore on any of the 24.X or 25rc's/25 ...

Soeren

maintainer
#1 lore raw

From: "Roland" <[email protected]>
Date: Fri, 2 May 2008 14:38:36 +0200

Quoted 11 lines

it seems it`s lapbether driver

reproduce:

on system with pcnet32 (vmware) do

modprobe pcnet32
modprobe lapbether
modprobe -r lapbether
modprobe -r pcnet32 -> hang -> unregister_netdevice: waiting for eth0 to become free

lapbeth_cleanup_driver() unregisters the netdevice, but does not release the reference to lapbeth->ethdev in those device instances.

Once this happens, and the lapbeth_dev_notifier is unregistered, these references will leak forever.

maintainer
#2 lore raw

From: David Miller <[email protected]>
Date: Fri, 02 May 2008 05:45:36 -0700 (PDT)

Quoted 15 lines

From: "Roland" <[email protected]>
Date: Fri, 2 May 2008 14:38:36 +0200

Quoted 11 lines

it seems it`s lapbether driver

reproduce:

on system with pcnet32 (vmware) do

modprobe pcnet32
modprobe lapbether
modprobe -r lapbether
modprobe -r pcnet32 -> hang -> unregister_netdevice: waiting for eth0 to become free

Quoted 5 lines

lapbeth_cleanup_driver() unregisters the netdevice, but does not release the reference to lapbeth->ethdev in those device instances.

Once this happens, and the lapbeth_dev_notifier is unregistered, these references will leak forever.

Roland, does this fix your bug?

lapbeth: Release ->ethdev when unregistering device.

Otherwise it leaks forever.

Based upon a report by Roland <[email protected]>

drivers/net/wan/lapbether.c +1 -0
index b5860b9..24fd613 100644
@@ -459,6 +459,7 @@ static void __exit lapbeth_cleanup_driver(void)
 	list_for_each_safe(entry, tmp, &lapbeth_devices) {
 		lapbeth = list_entry(entry, struct lapbethdev, node);
 
+		dev_put(lapbeth->ethdev);
 		unregister_netdevice(lapbeth->axdev);
 	}
 	rtnl_unlock();