From: devzero@web.de
To: David Miller <davem@davemloft.net>
Cc: akpm@linux-foundation.org, g4klx@g4klx.demon.co.uk,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: 24rc8: unregister_netdevice: waiting for ... to become free
Date: Sun, 04 May 2008 11:33:12 +0200 [thread overview]
Message-ID: <264300966@web.de> (raw)
> Roland, does this fix your bug?
Yes!
With this patch i can unload the nic driver again.
Thank you !
> -----Ursprüngliche Nachricht-----
> Von: "David Miller" <davem@davemloft.net>
> Gesendet: 04.05.08 06:11:32
> An: devzero@web.de
> CC: akpm@linux-foundation.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, g4klx@g4klx.demon.co.uk
> Betreff: Re: 24rc8: unregister_netdevice: waiting for ... to become free
> 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();
Acked-by: Roland Kletzing <devzero@web.de>
_______________________________________________________________________
Jetzt neu! Schützen Sie Ihren PC mit McAfee und WEB.DE. 30 Tage
kostenlos testen. http://www.pc-sicherheit.web.de/startseite/?mc=022220
next reply other threads:[~2008-05-04 9:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-04 9:33 devzero [this message]
2008-05-04 10:36 ` 24rc8: unregister_netdevice: waiting for ... to become free David Miller
-- strict thread matches above, loose matches on Subject: below --
2008-05-02 12:38 Roland
2008-05-02 12:45 ` David Miller
2008-05-04 4:11 ` 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=264300966@web.de \
--to=devzero@web.de \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--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).