| To: | Christoph Lameter <christoph@xxxxxxxxxxx> |
|---|---|
| Subject: | Re: atomic_dec_and_test for child dst needed in dst_destroy? |
| From: | Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> |
| Date: | Fri, 8 Apr 2005 09:07:38 +1000 |
| Cc: | "David S. Miller" <davem@xxxxxxxxxxxxx>, netdev@xxxxxxxxxxx, pravins@xxxxxxxxxxxxxx, shai@xxxxxxxxxxxxx |
| In-reply-to: | <Pine.LNX.4.58.0504071520050.3983@graphe.net> |
| References: | <Pine.LNX.4.58.0504051925250.21486@graphe.net> <E1DJ5y2-0003rF-00@gondolin.me.apana.org.au> <20050406111721.3ac67605.davem@davemloft.net> <20050407110724.GA8760@gondor.apana.org.au> <Pine.LNX.4.58.0504070842420.29731@graphe.net> <20050407212504.GA4939@gondor.apana.org.au> <Pine.LNX.4.58.0504071520050.3983@graphe.net> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
| User-agent: | Mutt/1.5.6+20040907i |
On Thu, Apr 07, 2005 at 03:30:28PM -0700, Christoph Lameter wrote: > > So in case f.e. the refcnt was 2 for a child NOHASH entry, then we > decrement the refcnt for the child but do not free it. However after > dst_destroy the parent is gone and presumably some skb->dst are still > pointing to the dst entry (or is there something else accounting for the > remaining __refcnt)? > > What happens to the child dst entry? Will the system simply never > deallocate it? If the refcnt is non-zero after the atomic_dec and the entry is NOHASH, we return it and the caller will add it to the GC list. See the relevant section in dst_run_gc and dst_free. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt |
| Previous by Date: | Re: [PATCH] RTNETLINK: Protocol family wildcard dumping for routing rules, Thomas Graf |
|---|---|
| Next by Date: | Re: [PATCH] RTNETLINK: Protocol family wildcard dumping for routing rules, jamal |
| Previous by Thread: | Re: atomic_dec_and_test for child dst needed in dst_destroy?, Christoph Lameter |
| Next by Thread: | Re: atomic_dec_and_test for child dst needed in dst_destroy?, Christoph Lameter |
| Indexes: | [Date] [Thread] [Top] [All Lists] |