lkml.org 
[lkml]   [2008]   [May]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
SubjectRe: 24rc8: unregister_netdevice: waiting for ... to become free
From
From: David Miller <davem@davemloft.net>
Date: Fri, 02 May 2008 05:45:36 -0700 (PDT)

> From: "Roland" <devzero@web.de>
> Date: Fri, 2 May 2008 14:38:36 +0200
>
> > 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.

Roland, does this fix your bug?

lapbeth: Release ->ethdev when unregistering device.

Otherwise it leaks forever.

Based upon a report by Roland <devzero@web.de>

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

diff --git a/drivers/net/wan/lapbether.c b/drivers/net/wan/lapbether.c
index b5860b9..24fd613 100644
--- a/drivers/net/wan/lapbether.c
+++ b/drivers/net/wan/lapbether.c
@@ -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();

\
 
 \ /
  Last update: 2008-05-04 06:13    [W:0.029 / U:7.036 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site