From: David Miller <davem@davemloft.net>
To: devzero@web.de
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, g4klx@g4klx.demon.co.uk
Subject: Re: 24rc8: unregister_netdevice: waiting for ... to become free
Date: Sat, 03 May 2008 21:11:09 -0700 (PDT) [thread overview]
Message-ID: <20080503.211109.71037948.davem@davemloft.net> (raw)
In-Reply-To: <20080502.054536.109642865.davem@davemloft.net>
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();
next prev parent reply other threads:[~2008-05-04 4:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-02 12:38 24rc8: unregister_netdevice: waiting for ... to become free Roland
2008-05-02 12:45 ` David Miller
2008-05-04 4:11 ` David Miller [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-05-04 9:33 devzero
2008-05-04 10:36 ` David Miller
2008-05-02 9:31 Roland
2008-05-02 15:57 ` Soeren Sonnenburg
2008-05-02 16:45 ` Roland
[not found] <004701c8abf4$4cefe820$6400a8c0@bui.materna.com>
2008-05-02 5:59 ` Andrew Morton
2008-05-02 6:15 ` Soeren Sonnenburg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080503.211109.71037948.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=akpm@linux-foundation.org \
--cc=devzero@web.de \
--cc=g4klx@g4klx.demon.co.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).