The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Jiayuan Chen <jiayuan.chen@linux.dev>
To: Ido Schimmel <idosch@nvidia.com>
Cc: netdev@vger.kernel.org, David Ahern <dsahern@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>,
	Omid Ehtemam-Haghighi <omid.ehtemamhaghighi@menlosecurity.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net 1/2] ipv6: fix possible infinite loop in rt6_fill_node()
Date: Thu, 28 May 2026 16:56:07 +0800	[thread overview]
Message-ID: <940b4f22-dcb0-4ff3-91b1-ac51d336c0ed@linux.dev> (raw)
In-Reply-To: <20260528084502.GA592092@shredder>


On 5/28/26 4:45 PM, Ido Schimmel wrote:
> On Wed, May 27, 2026 at 01:31:30PM +0800, Jiayuan Chen wrote:
>> Sashiko reported this issue [1]. Apply the same fix as
>> commit f8d8ce1b515a ("ipv6: fix possible infinite loop in fib6_info_uses_dev()").
>>
>> Writers holding tb6_lock can list_del_rcu(&rt->fib6_siblings)
>> without waiting for RCU readers; rt->fib6_siblings.next then still
>> points into the old ring and this softirq-side walker never reaches
>> &rt->fib6_siblings, causing a CPU stall. fib6_purge_rt() always
> s/fib6_purge_rt/fib6_del_route/ ?

You're right, that's fib6_del_route().


>> WRITE_ONCE()s rt->fib6_nsiblings to 0 before list_del_rcu(), so an
>> inside-loop check is a reliable detach signal.
>>
>> [1] https://sashiko.dev/#/patchset/20260526020227.4857-1-jiayuan.chen%40linux.dev
>>
>> Fixes: d9ccb18f83ea ("ipv6: Fix soft lockups in fib6_select_path under high next hop churn")
>> Signed-off-by: Jiayuan Chen <jiayuan.chen@linux.dev>
> Reviewed-by: Ido Schimmel <idosch@nvidia.com>
>
> Sashiko points out two pre-existing issues:
>
> 1. Same issue in nft_fib6_info_nh_uses_dev(). Fixed by:
> https://lore.kernel.org/all/20260526020227.4857-1-jiayuan.chen@linux.dev/
>
> 2. Missing nlmsg_{end, cancel}() following ip6mr_get_route(). Seems
> valid, but completely unrelated.

  reply	other threads:[~2026-05-28  8:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-27  5:31 [PATCH net 1/2] ipv6: fix possible infinite loop in rt6_fill_node() Jiayuan Chen
2026-05-27  5:31 ` [PATCH net 2/2] ipv6: fix possible infinite loop in fib6_select_path() Jiayuan Chen
2026-05-28  8:45   ` Ido Schimmel
2026-05-28  8:45 ` [PATCH net 1/2] ipv6: fix possible infinite loop in rt6_fill_node() Ido Schimmel
2026-05-28  8:56   ` Jiayuan Chen [this message]
2026-05-29 19:50 ` patchwork-bot+netdevbpf

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=940b4f22-dcb0-4ff3-91b1-ac51d336c0ed@linux.dev \
    --to=jiayuan.chen@linux.dev \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=idosch@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=omid.ehtemamhaghighi@menlosecurity.com \
    --cc=pabeni@redhat.com \
    /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