From: Patrick McHardy <kaber@trash.net>
To: Harald Welte <laforge@netfilter.org>
Cc: Netfilter Development Mailinglist
<netfilter-devel@lists.netfilter.org>,
Pablo Neira <pablo@eurodev.net>
Subject: Re: [PATCH] Drop expectation refcount after unlinking expectation
Date: Sat, 06 Aug 2005 16:29:31 +0200 [thread overview]
Message-ID: <42F4C94B.4060405@trash.net> (raw)
In-Reply-To: <20050805131721.GJ4245@rama.de.gnumonks.org>
Harald Welte wrote:
> On Fri, Aug 05, 2005 at 12:21:00PM +0200, Patrick McHardy wrote:
>
>>Pablo Neira wrote:
>>
>>>This patch comes from the following thread:
>>>
>>>[PATCH 6/7] Fix expectation creation
>>>
>>>In unlink_expect, the expectation is removed from the list so the
>>>refcount must be dropped as well.
>>
>>The patch is fine, but it leaves the somewhat broken function
>>__ip_ct_expect_unlink_destroy around. I'm not sure what the
>>intention of this function is, it looks like a lazy way of
>>killing conntracks without manually dropping the timer refcnt.
>>Anyway it invites people to use it in the wrong place and
>>should die IMO.
>
> Ok, if it dies we'd have to export unlink_expect() for ctnetlink.
>
> However, all places calling unlink_expect() also call expect_put()
> immediately after it - with one exception: find_expectation() :(
>
> Getting back to your comment:
>
>>it looks like a lazy way of killing conntracks without manually
>>dropping the timer refcnt.
>
> Sorry, I can't follow you: Did you mean something like 'lazy way of
> killing expects without manually expiring the timer' ?
>
> So your whole objection is to not have timer_del() inside
> __ip_ct_expect_unlink_destroy() ? this can be changed easily.
My objection was the other way around, unlink_expect drops the
reference taken for the lists, as it should.
__ip_ct_expect_unlink_destroy() additionally drops a reference
which I assume is the timer reference, but it doesn't delete
the timer. If the caller deletes the timer, he should be the
one to drop the reference. Your suggestion is of course perfectly
fine with me, if the timer is deleted within that function it
can also drop the reference.
next prev parent reply other threads:[~2005-08-06 14:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-05 0:38 [PATCH] Drop expectation refcount after unlinking expectation Pablo Neira
2005-08-05 10:21 ` Patrick McHardy
2005-08-05 13:17 ` Harald Welte
2005-08-06 14:29 ` Patrick McHardy [this message]
2005-08-05 10:43 ` Patrick McHardy
2005-08-05 13:08 ` Harald Welte
2005-08-06 14:24 ` Patrick McHardy
2005-08-08 0:59 ` Yasuyuki KOZAKAI
2005-08-05 13:20 ` Harald Welte
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=42F4C94B.4060405@trash.net \
--to=kaber@trash.net \
--cc=laforge@netfilter.org \
--cc=netfilter-devel@lists.netfilter.org \
--cc=pablo@eurodev.net \
/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.