From: Florian Westphal <fw@strlen.de>
To: Jozsef Kadlecsik <kadlec@netfilter.org>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>,
Florian Westphal <fw@strlen.de>, Phil Sutter <phil@nwl.cc>,
netfilter-devel@vger.kernel.org
Subject: Re: [nf PATCH v2 8/8] netfilter: nf_tables: Add locking for NFT_MSG_GETSETELEM_RESET requests
Date: Thu, 28 Sep 2023 22:09:46 +0200 [thread overview]
Message-ID: <20230928200946.GB28176@breakpoint.cc> (raw)
In-Reply-To: <fedeecd9-b03-789-bc6c-21a697fc29d@netfilter.org>
Jozsef Kadlecsik <kadlec@netfilter.org> wrote:
> On Thu, 28 Sep 2023, Pablo Neira Ayuso wrote:
> > One concern might be deadlock due to reordering, but I don't see how
> > that can happen.
>
> The same problem exists ipset: when a set is listed/saved (dumped),
> concurrent destroy/rename/swap for the same set must be excluded. As
> neither spinlock nor mutex helps, a reference counter is used: the start
> of the dump increases it and by checking it all concurrent events can
> safely be rejected by returning EBUSY.
Thanks for sharing!
I assume that means that a dumper that starts a dump, and then
goes to sleep before closing the socket/finishing the dump can
block further ipset updates, is that correct?
(I assume so, I don't see a solution that doesn't trade one problem
for another).
next prev parent reply other threads:[~2023-09-28 20:09 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-28 16:52 [nf PATCH v2 0/8] Introduce locking for reset requests Phil Sutter
2023-09-28 16:52 ` [nf PATCH v2 1/8] netfilter: nf_tables: Don't allocate nft_rule_dump_ctx Phil Sutter
2023-09-28 18:49 ` Pablo Neira Ayuso
2023-09-29 10:15 ` Phil Sutter
2023-09-28 19:00 ` Florian Westphal
2023-09-29 10:13 ` Phil Sutter
2023-09-28 16:52 ` [nf PATCH v2 2/8] netfilter: nf_tables: Introduce nf_tables_getrule_single() Phil Sutter
2023-09-28 16:52 ` [nf PATCH v2 3/8] netfilter: nf_tables: Add locking for NFT_MSG_GETRULE_RESET requests Phil Sutter
2023-09-28 16:52 ` [nf PATCH v2 4/8] netfilter: nf_tables: Introduce struct nft_obj_dump_ctx Phil Sutter
2023-09-28 16:52 ` [nf PATCH v2 5/8] netfilter: nf_tables: Introduce nf_tables_getobj_single Phil Sutter
2023-09-28 16:52 ` [nf PATCH v2 6/8] netfilter: nf_tables: Add locking for NFT_MSG_GETOBJ_RESET requests Phil Sutter
2023-09-28 16:52 ` [nf PATCH v2 7/8] netfilter: nf_tables: Pass reset bit in nft_set_dump_ctx Phil Sutter
2023-09-28 18:53 ` Pablo Neira Ayuso
2023-09-29 10:08 ` Phil Sutter
2023-09-29 10:15 ` Pablo Neira Ayuso
2023-09-29 10:18 ` Phil Sutter
2023-09-29 10:56 ` Pablo Neira Ayuso
2023-09-29 11:12 ` Phil Sutter
2023-09-28 16:52 ` [nf PATCH v2 8/8] netfilter: nf_tables: Add locking for NFT_MSG_GETSETELEM_RESET requests Phil Sutter
2023-09-28 17:46 ` Florian Westphal
2023-09-28 18:47 ` Pablo Neira Ayuso
2023-09-28 18:57 ` Florian Westphal
2023-09-28 19:04 ` Pablo Neira Ayuso
2023-09-28 19:21 ` Florian Westphal
2023-09-28 20:07 ` Florian Westphal
2023-09-29 11:25 ` Phil Sutter
2023-09-29 11:30 ` Florian Westphal
2023-09-29 11:45 ` Phil Sutter
2023-09-28 19:39 ` Jozsef Kadlecsik
2023-09-28 20:09 ` Florian Westphal [this message]
2023-09-28 20:25 ` Jozsef Kadlecsik
2023-09-29 11:03 ` Phil Sutter
2023-09-28 18:51 ` Pablo Neira Ayuso
2023-09-29 10:28 ` Phil Sutter
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=20230928200946.GB28176@breakpoint.cc \
--to=fw@strlen.de \
--cc=kadlec@netfilter.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
--cc=phil@nwl.cc \
/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.