From: Florian Westphal <fw@strlen.de>
To: Stefano Brivio <sbrivio@redhat.com>
Cc: Florian Westphal <fw@strlen.de>, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nf-next 3/9] netfilter: nft_set_pipapo: prepare destroy function for on-demand clone
Date: Tue, 9 Apr 2024 13:07:04 +0200 [thread overview]
Message-ID: <20240409110704.GA15445@breakpoint.cc> (raw)
In-Reply-To: <20240408174503.0792a92e@elisabeth>
Stefano Brivio <sbrivio@redhat.com> wrote:
> > The rcu_barrier() is removed, its not needed: old call_rcu instances
> > for pipapo_reclaim_match do not access struct nft_set.
>
> True, pipapo_reclaim_match() won't, but nft_set_pipapo_match_destroy()
> will, right? That is:
>
> > - if (m) {
> > - rcu_barrier();
>
> ...before b0e256f3dd2b ("netfilter: nft_set_pipapo: release elements in
> clone only from destroy path"), this rcu_barrier() was needed because we'd
> call nft_set_pipapo_match_destroy() on 'm'.
>
> That call is now gone, and we could have dropped it at that point, but:
I do not follow. nft_pipapo_destroy() is not invoked asynchronously via
call_rcu, its invoked from either abort path or the gc work queue at at
time where there must be no references to nft_set anymore.
What do we wait for, i.e., which outstanding rcu callback could
reference a data structure that nft_pipapo_destroy() will free?
> > + } else {
> > + nft_set_pipapo_match_destroy(ctx, set, m);
>
> now it's back, so we should actually move rcu_barrier() before this
> call? I think it's needed because nft_set_pipapo_match_destroy() does
> access nft_set data.
See above, what do we need to wait for?
next prev parent reply other threads:[~2024-04-09 11:07 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-03 8:41 [PATCH nf-next 0/9] nft_set_pipapo: remove cannot-fail allocations on commit and abort Florian Westphal
2024-04-03 8:41 ` [PATCH nf-next 1/9] netfilter: nft_set_pipapo: move prove_locking helper around Florian Westphal
2024-04-03 8:41 ` [PATCH nf-next 2/9] netfilter: nft_set_pipapo: make pipapo_clone helper return NULL Florian Westphal
2024-04-03 8:41 ` [PATCH nf-next 3/9] netfilter: nft_set_pipapo: prepare destroy function for on-demand clone Florian Westphal
2024-04-08 15:45 ` Stefano Brivio
2024-04-09 11:07 ` Florian Westphal [this message]
2024-04-09 12:54 ` Stefano Brivio
2024-04-09 13:04 ` Florian Westphal
2024-04-09 13:10 ` Stefano Brivio
2024-04-03 8:41 ` [PATCH nf-next 4/9] netfilter: nft_set_pipapo: prepare walk " Florian Westphal
2024-04-03 8:41 ` [PATCH nf-next 5/9] netfilter: nf_tables: pass new nft_iter_type hint to walker Florian Westphal
2024-04-03 8:41 ` [PATCH nf-next 6/9] netfilter: nft_set_pipapo: merge deactivate helper into caller Florian Westphal
2024-04-03 8:41 ` [PATCH nf-next 7/9] netfilter: nft_set_pipapo: prepare pipapo_get helper for on-demand clone Florian Westphal
2024-04-03 8:41 ` [PATCH nf-next 8/9] netfilter: nft_set_pipapo: move cloning of match info to insert/removal path Florian Westphal
2024-04-08 15:45 ` Stefano Brivio
2024-04-03 8:41 ` [PATCH nf-next 9/9] netfilter: nft_set_pipapo: remove dirty flag Florian Westphal
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=20240409110704.GA15445@breakpoint.cc \
--to=fw@strlen.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=sbrivio@redhat.com \
/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.