| To: | Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: Bug#251215: kernel-image-2.6.6-1-k7: pppd locks up, cannot be killed, during ppp shutdown |
| From: | "David S. Miller" <davem@xxxxxxxxxx> |
| Date: | Sat, 29 May 2004 12:48:33 -0700 |
| Cc: | debian.bugs@xxxxxxxxxxxxxxxx, 251215@xxxxxxxxxxxxxxx, shemminger@xxxxxxxx, jgarzik@xxxxxxxxx, netdev@xxxxxxxxxxx |
| In-reply-to: | <20040529051736.GA11303@gondor.apana.org.au> |
| References: | <E1BTLVa-000Ezb-FC@johnnybravo.uk.clara.net> <20040528124355.GA2391@gondor.apana.org.au> <40B744DC.9956BF50@kepier.clara.net> <20040529051736.GA11303@gondor.apana.org.au> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
On Sat, 29 May 2004 15:17:36 +1000
Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> 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?
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [IPSEC] fix ref counting in __xfrm4_bundle_create(), David S. Miller |
|---|---|
| Next by Date: | Re: Bug#251215: kernel-image-2.6.6-1-k7: pppd locks up, cannot be killed, during ppp shutdown, David S. Miller |
| Previous by Thread: | Re: Bug#251215: kernel-image-2.6.6-1-k7: pppd locks up, cannot be killed, during ppp shutdown, David S. Miller |
| Next by Thread: | cpu optimalization settings in 2.6 and routing, Andre Tomt |
| Indexes: | [Date] [Thread] [Top] [All Lists] |