Linux Netfilter development
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nf] netfilter: nfnetlink_log: wait for rcu grace period before freeing pernet state
Date: Mon, 3 Aug 2026 20:32:22 +0200	[thread overview]
Message-ID: <anDetoVAYqu0Hv2I@strlen.de> (raw)
In-Reply-To: <20260803084329.10282-1-fw@strlen.de>

Florian Westphal <fw@strlen.de> wrote:
> sashiko reports: "nfnl_log_net_exit() calls nf_log_unset(), which
> clears the logger pointer without an RCU grace period.  Immediately after,
> ops_free_list() frees the per-net state while concurrent packets might
> still be executing nf_log_packet() under rcu_read_lock()."
> 
> Clear the pointer via .pre_exit to make sure rcu readers have completed
> before pernet storage is free'd.  The change in nf_log_syslog.c is only
> done for consistency: it doesn't use pernet data.

Forgot to add:
Fixes: 9368a53c471b ("netfilter: nfnetlink_log: add net namespace support for nfnetlink_log")

The sashiko review can be ignored, its correct but there is a pending
ebt_nflog patch that resolves the issue.

      reply	other threads:[~2026-08-03 18:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-03  8:43 [PATCH nf] netfilter: nfnetlink_log: wait for rcu grace period before freeing pernet state Florian Westphal
2026-08-03 18:32 ` Florian Westphal [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=anDetoVAYqu0Hv2I@strlen.de \
    --to=fw@strlen.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox