From: "David S. Miller" <davem@redhat.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: debian.bugs@kepier.clara.net, 251215@bugs.debian.org,
shemminger@osdl.org, jgarzik@pobox.com, netdev@oss.sgi.com
Subject: Re: Bug#251215: kernel-image-2.6.6-1-k7: pppd locks up, cannot be killed, during ppp shutdown
Date: Sat, 29 May 2004 12:48:33 -0700 [thread overview]
Message-ID: <20040529124833.5eca66d7.davem@redhat.com> (raw)
In-Reply-To: <20040529051736.GA11303@gondor.apana.org.au>
On Sat, 29 May 2004 15:17:36 +1000
Herbert Xu <herbert@gondor.apana.org.au> wrote:
> Why do we need to call free_netdev after unregistering the netdev
> from the drivers at all? What's wrong with calling it from run_todo
> itself?
Because the driver is the only agent which knows when it is safe
to free up the structure. It may still have some attached memory
to free, for example, ala:
unregister_netdev(dev);
kfree(dev->priv);
free_netdev(dev);
This is common, for example in drivers/net/tg3.c:tg3_remove_one() we
have:
struct tg3 *tp = netdev_priv(dev);
unregister_netdev(dev);
iounmap((void *)tp->regs);
free_netdev(dev);
See?
next prev parent reply other threads:[~2004-05-29 19:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <E1BTLVa-000Ezb-FC@johnnybravo.uk.clara.net>
[not found] ` <20040528124355.GA2391@gondor.apana.org.au>
[not found] ` <40B744DC.9956BF50@kepier.clara.net>
2004-05-29 5:17 ` Bug#251215: kernel-image-2.6.6-1-k7: pppd locks up, cannot be killed, during ppp shutdown Herbert Xu
2004-05-29 12:00 ` Herbert Xu
2004-05-29 19:51 ` David S. Miller
2004-05-29 20:04 ` Herbert Xu
2004-05-29 20:11 ` David S. Miller
2004-05-29 19:48 ` David S. Miller [this message]
2004-06-01 16:13 ` Stephen Hemminger
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=20040529124833.5eca66d7.davem@redhat.com \
--to=davem@redhat.com \
--cc=251215@bugs.debian.org \
--cc=debian.bugs@kepier.clara.net \
--cc=herbert@gondor.apana.org.au \
--cc=jgarzik@pobox.com \
--cc=netdev@oss.sgi.com \
--cc=shemminger@osdl.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.