Linux Netfilter development
 help / color / mirror / Atom feed
From: Jiayuan Chen <jiayuan.chen@linux.dev>
To: Florian Westphal <fw@strlen.de>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: Followup needed for netfilter: nft_fib_ipv6: walk fib6_siblings under RCU?
Date: Tue, 26 May 2026 09:47:55 +0800	[thread overview]
Message-ID: <2c1c63e0-bcba-41e0-bd15-d0fcb1924838@linux.dev> (raw)
In-Reply-To: <ahSMn9GB65ztRN2e@strlen.de>


On 5/26/26 1:53 AM, Florian Westphal wrote:
> Hello,
>
> Sashiko claims we need this change:
>
> diff --git a/net/ipv6/netfilter/nft_fib_ipv6.c b/net/ipv6/netfilter/nft_fib_ipv6.c
> --- a/net/ipv6/netfilter/nft_fib_ipv6.c
> +++ b/net/ipv6/netfilter/nft_fib_ipv6.c
> @@ -191,6 +191,9 @@ static bool nft_fib6_info_nh_uses_dev(struct fib6_info *rt,
>   
>                  if (nft_fib6_info_nh_dev_match(nh_dev, dev))
>                          return true;
> +
> +               if (!READ_ONCE(rt->fib6_nsiblings))
> +                       return false;
>          }
>   
>          return false;
>
>
> Could ypu please check and send a followup if its correct?
> AFAICS the nodes can be relinked to a*different* list and
> then this turns into busyloop without the extra test.
>
> https://sashiko.dev/#/patchset/20260520023411.391233-1-jiayuan.chen%40linux.dev
>
> Thank you.


Hi,

Thanks, you're right. net/ipv6/route.c already uses the same
pattern, and Eric applied similar fixes:

f8d8ce1b515a ("ipv6: fix possible infinite loop in fib6_info_uses_dev()")
54e6fe9dd3b0 ("ipv6: prevent infinite loop in rt6_nlmsg_size()")

I'll send a follow-up patch.

Thanks,
Jiayuan


      reply	other threads:[~2026-05-26  1:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-25 17:53 Followup needed for netfilter: nft_fib_ipv6: walk fib6_siblings under RCU? Florian Westphal
2026-05-26  1:47 ` Jiayuan Chen [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=2c1c63e0-bcba-41e0-bd15-d0fcb1924838@linux.dev \
    --to=jiayuan.chen@linux.dev \
    --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