From: Ido Schimmel <idosch@nvidia.com>
To: Zihan Xi <zihanx@nebusec.ai>
Cc: netdev@vger.kernel.org, linux-kernel@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>,
"Peter Nørlund" <pch@ordbogen.com>,
stable@vger.kernel.org, Vega <vega@nebusec.ai>
Subject: Re: [PATCH net v2 1/1] ipv4: avoid divide by zero in fib_rebalance
Date: Thu, 27 Aug 2026 22:34:54 +0300 [thread overview]
Message-ID: <20260827193454.GA2320979@shredder> (raw)
In-Reply-To: <20260827182514.4667-2-zihanx@nebusec.ai>
On Thu, Aug 27, 2026 at 06:25:14PM +0000, Zihan Xi wrote:
> fib_rebalance() computes the total eligible nexthop weight in one pass
> and programs upper bounds in a second pass. A concurrent change to
> ignore_routes_with_linkdown can make the first pass return zero while
> the second pass sees an eligible nexthop, resulting in division by zero.
>
> If the first pass reports a zero total, set each nexthop upper bound to
> -1 and skip the division. This matches the IPv6 fix in commit
> d2c26c2911dd ("ipv6: avoid divide by zero in rt6_multipath_rebalance")
> and preserves the lock-free rebalance path.
>
> Fixes: 0e884c78ee19 ("ipv4: L3 hash-based multipath")
> Cc: stable@vger.kernel.org
> Reported-by: Vega <vega@nebusec.ai>
> Assisted-by: Codex:gpt-5.4
> Signed-off-by: Zihan Xi <zihanx@nebusec.ai>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
next prev parent reply other threads:[~2026-08-27 19:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-27 18:25 [PATCH net v2 0/1] " Zihan Xi
2026-08-27 18:25 ` [PATCH net v2 1/1] " Zihan Xi
2026-08-27 18:39 ` Eric Dumazet
2026-08-27 19:34 ` Ido Schimmel [this message]
2026-08-28 21:40 ` [PATCH net v2 0/1] " 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=20260827193454.GA2320979@shredder \
--to=idosch@nvidia.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pch@ordbogen.com \
--cc=stable@vger.kernel.org \
--cc=vega@nebusec.ai \
--cc=zihanx@nebusec.ai \
/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
all inboxes | Powered by JetHome®