From: Florian Westphal <fw@strlen.de>
To: Sven Auhagen <Sven.Auhagen@belden.com>
Cc: "netfilter-devel@vger.kernel.org" <netfilter-devel@vger.kernel.org>
Subject: Re: Cannot allocate memory delete table inet filter
Date: Tue, 1 Jul 2025 12:48:20 +0200 [thread overview]
Message-ID: <aGO89KaXVNuToRJg@strlen.de> (raw)
In-Reply-To: <BY1PR18MB587473C6870ED217731B73F7E041A@BY1PR18MB5874.namprd18.prod.outlook.com>
Sven Auhagen <Sven.Auhagen@belden.com> wrote:
> One question regarding option 2.
> Don't I need to rcu read lock the nft_set_flush now because when I preallocate the transaction I need to make sure that the nelems do not change before doing the walk?
rcu read lock won't make nelems stable either.
The preallocation can fall short (nelems increased) or
it can have leftover elements (if elements timed out or
were deleted) after the walk.
So, no, you don't need to hold the rcu read lock, but
you can't rely on nelems remaining stable.
next prev parent reply other threads:[~2025-07-01 10:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-25 8:00 Cannot allocate memory delete table inet filter Sven Auhagen
2025-06-25 14:29 ` Florian Westphal
2025-06-25 14:51 ` Sven Auhagen
2025-07-01 8:15 ` Sven Auhagen
2025-07-01 10:48 ` Florian Westphal [this message]
2025-07-01 21:49 ` Florian Westphal
2025-07-02 3:51 ` Sven Auhagen
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=aGO89KaXVNuToRJg@strlen.de \
--to=fw@strlen.de \
--cc=Sven.Auhagen@belden.com \
--cc=netfilter-devel@vger.kernel.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 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.