[prev in list] [next in list] [prev in thread] [next in thread]
List: netfilter-devel
Subject: Re: double call to ip_conntrack_put() ?
From: Wang Jian <lark () linux ! net ! cn>
Date: 2005-04-18 11:22:47
Message-ID: 20050418192122.037D.LARK () linux ! net ! cn
[Download RAW message or body]
Hi Amin Azez,
Yes, I am also confused by the _put for a while until I read the code.
IMHO, it's more clear to rename it to _release.
On Mon, 18 Apr 2005 12:02:31 +0100, Amin Azez <azez@ufomechanic.net> wrote:
> Tobias DiPasquale wrote:
> > This is intended. tuplehash_to_ctrack() generates a reference to the
> > conntrack record. In death_by_timeout() the refcount is decremented,
> > yielding 1 for the second call to ip_conntrack_put(). The dec_and_test
> > in nf_conntrack_put() (called by ip_conntrack_put()) will result in a
> > refcount of 0, sending the record to the destroy_conntrack() function
> > (or more properly, whatever's registered in nfct->destroy(), which I'm
> > pretty sure is always either NULL or destroy_conntrack()).
>
> What I found confusing initially was that "put" in "ip_conntrack_put"
> means "release" or "refcount--" instead of "write" or "store" which
> would have been my first guess.
>
> Sam Azez
>
--
lark
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic