From: Patrick McHardy <kaber@trash.net>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Netfilter Development Mailinglist <netfilter-devel@vger.kernel.org>
Subject: Re: netfilter: ctnetlink: deliver events for conntracks changed from userspace
Date: Mon, 06 Apr 2009 16:50:10 +0200 [thread overview]
Message-ID: <49DA16A2.9040800@trash.net> (raw)
In-Reply-To: <49DA1438.6010508@netfilter.org>
Pablo Neira Ayuso wrote:
> Patrick McHardy wrote:
>>> nf_ct_expect_insert(expect);
>>> + atomic_inc(&expect->use);
>> This I don't understand - the caller is holding a reference, why
>> do we need another one?
>
> I thought that the expectation timer may expire while delivering the
> event, but that cannot happen since we still hold the reference until
> the expectation setup is finished (nf_ct_expect_alloc() gets the
> refcount, later nf_ct_expect_put() puts it).
Yep, that was my understanding as well.
>> The next question would be - why do we need those two functions at
>> all? Aside from the apparently unnecessary reference counting, the
>> only difference is reporting, and that actually uses the exact
>> same code path.
>
> Is the patch attached on the right track?
It looks fine, thanks. I'll test whether it fixes the problem for
me once I can get the damned -rc to boot. I'll let you know how
it goes.
prev parent reply other threads:[~2009-04-06 14:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-06 12:32 netfilter: ctnetlink: deliver events for conntracks changed from userspace Patrick McHardy
2009-04-06 14:39 ` Pablo Neira Ayuso
2009-04-06 14:50 ` Patrick McHardy [this message]
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=49DA16A2.9040800@trash.net \
--to=kaber@trash.net \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).