Linux Netfilter development
 help / color / mirror / Atom feed
From: Matthieu Baerts <matttbe@kernel.org>
To: Florian Westphal <fw@strlen.de>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nf-next 1/7] netfilter: nf_tables: avoid false-positive lockdep splat on rule deletion
Date: Fri, 25 Oct 2024 17:09:57 +0200	[thread overview]
Message-ID: <3f40f462-2b54-4eeb-9fbb-1f76ab43f440@kernel.org> (raw)
In-Reply-To: <20241025133230.22491-2-fw@strlen.de>

Hi Florian,

On 25/10/2024 15:32, Florian Westphal wrote:
> On rule delete we get:
>  WARNING: suspicious RCU usage
>  net/netfilter/nf_tables_api.c:3420 RCU-list traversed in non-reader section!!
>  1 lock held by iptables/134:
>    #0: ffff888008c4fcc8 (&nft_net->commit_mutex){+.+.}-{3:3}, at: nf_tables_valid_genid (include/linux/jiffies.h:101) nf_tables
> 
> Code is fine, no other CPU can change the list because we're holding
> transaction mutex.
> 
> Pass the needed lockdep annotation to the iterator and fix
> two comments for functions that are no longer restricted to rcu-only
> context.
> 
> This is enough to resolve rule delete, but there are several other
> missing annotations, added in followup-patches.

Thank you for the patch! (and sorry for having somehow pushed you to
open the pandora box for the other cases :) )

I confirm this fix avoids the warning in my case:

Tested-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.


  reply	other threads:[~2024-10-25 15:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-25 13:32 [PATCH nf-next 0/7] netfilter: nf_tables: avoid PROVE_RCU_LIST splats Florian Westphal
2024-10-25 13:32 ` [PATCH nf-next 1/7] netfilter: nf_tables: avoid false-positive lockdep splat on rule deletion Florian Westphal
2024-10-25 15:09   ` Matthieu Baerts [this message]
2024-10-26  9:35     ` Florian Westphal
2024-10-26 11:20       ` Matthieu Baerts
2024-10-25 13:32 ` [PATCH nf-next 2/7] netfilter: nf_tables: avoid false-positive lockdep splats with sets Florian Westphal
2024-10-25 13:32 ` [PATCH nf-next 3/7] netfilter: nf_tables: avoid false-positive lockdep splats with flowtables Florian Westphal
2024-10-25 13:32 ` [PATCH nf-next 4/7] netfilter: nf_tables: avoid false-positive lockdep splats in set walker Florian Westphal
2024-10-25 13:32 ` [PATCH nf-next 5/7] netfilter: nf_tables: avoid false-positive lockdep splats with basechain hook Florian Westphal
2024-10-25 14:40   ` Phil Sutter
2024-10-25 13:32 ` [PATCH nf-next 6/7] netfilter: nf_tables: must hold rcu read lock while iterating expression type list Florian Westphal
2024-10-26  9:39   ` Florian Westphal
2024-10-25 13:32 ` [PATCH nf-next 7/7] netfilter: nf_tables: must hold rcu read lock while iterating object " 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=3f40f462-2b54-4eeb-9fbb-1f76ab43f440@kernel.org \
    --to=matttbe@kernel.org \
    --cc=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