* [PATCH net v2 1/2] ipv4: do not warn on route notification size race
2026-10-08 5:29 [PATCH net v2 0/2] ipv4/ipv6: do not warn on route notification size races Daehyeon Ko
@ 2026-10-08 5:29 ` Daehyeon Ko
2026-10-08 5:29 ` [PATCH net v2 2/2] ipv6: " Daehyeon Ko
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Daehyeon Ko @ 2026-10-08 5:29 UTC (permalink / raw)
To: David Ahern, Ido Schimmel
Cc: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Simon Horman, Amit Cohen, Roopa Prabhu, netdev, linux-kernel,
Daehyeon Ko
Commit 680aea08e78c ("net: ipv4: Emit notification when fib hardware
flags are changed") added asynchronous route notifications for hardware
flag changes.
fib_alias_hw_flags_set() sizes the skb with fib_nlmsg_size() and later
fills it with fib_dump_info() while holding only RCU. With nexthop
compatibility mode enabled, a concurrent replacement can grow the group
between these independent snapshots. fib_dump_info() can then
legitimately return -EMSGSIZE, so the warning does not prove a sizing bug.
Remove the warning. The existing error path still frees the skb and
reports the error to listeners.
Fixes: 680aea08e78c ("net: ipv4: Emit notification when fib hardware flags are changed")
Reported-by: Ido Schimmel <idosch@nvidia.com>
Link: https://lore.kernel.org/netdev/20261004082043.GB92032@shredder/
Suggested-by: Ido Schimmel <idosch@nvidia.com>
Cc: stable@vger.kernel.org
Assisted-by: LLM
Signed-off-by: Daehyeon Ko <4ncienth@gmail.com>
---
net/ipv4/fib_trie.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c
index acb1e43859143e..248514dce0cdd5 100644
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
@@ -1079,8 +1079,6 @@ void fib_alias_hw_flags_set(struct net *net, const struct fib_rt_info *fri)
err = fib_dump_info(skb, 0, 0, RTM_NEWROUTE, fri, 0);
if (err < 0) {
- /* -EMSGSIZE implies BUG in fib_nlmsg_size() */
- WARN_ON(err == -EMSGSIZE);
kfree_skb(skb);
goto errout;
}
--
2.55.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH net v2 2/2] ipv6: do not warn on route notification size race
2026-10-08 5:29 [PATCH net v2 0/2] ipv4/ipv6: do not warn on route notification size races Daehyeon Ko
2026-10-08 5:29 ` [PATCH net v2 1/2] ipv4: do not warn on route notification size race Daehyeon Ko
@ 2026-10-08 5:29 ` Daehyeon Ko
2026-10-08 5:35 ` [PATCH net v2 0/2] ipv4/ipv6: do not warn on route notification size races netdev-bot+sinfo
2026-10-08 18:50 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: Daehyeon Ko @ 2026-10-08 5:29 UTC (permalink / raw)
To: David Ahern, Ido Schimmel
Cc: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Simon Horman, Amit Cohen, Roopa Prabhu, netdev, linux-kernel,
Daehyeon Ko
fib6_info_hw_flags_set() sizes the skb with rt6_nlmsg_size() and later
fills it with rt6_fill_node(). With nexthop compatibility mode enabled,
a concurrent replacement can grow the group between these independent
snapshots. rt6_fill_node() can then legitimately return -EMSGSIZE, so
the warning does not prove a sizing bug.
Remove the warning. The existing error path still frees the skb and
reports the error to listeners.
Fixes: 907eea486888 ("net: ipv6: Emit notification when fib hardware flags are changed")
Reported-by: Ido Schimmel <idosch@nvidia.com>
Link: https://lore.kernel.org/netdev/20261007114003.GA1011260@shredder/
Suggested-by: Ido Schimmel <idosch@nvidia.com>
Cc: stable@vger.kernel.org
Assisted-by: LLM
Signed-off-by: Daehyeon Ko <4ncienth@gmail.com>
---
net/ipv6/route.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 153ce16628c1e1..a5e955e56e794f 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -6509,8 +6509,6 @@ void fib6_info_hw_flags_set(struct net *net, struct fib6_info *f6i,
err = rt6_fill_node(net, skb, f6i, NULL, NULL, NULL, 0, RTM_NEWROUTE, 0,
0, 0, RT_DEL_REASON_UNSPEC);
if (err < 0) {
- /* -EMSGSIZE implies BUG in rt6_nlmsg_size() */
- WARN_ON(err == -EMSGSIZE);
kfree_skb(skb);
goto errout;
}
--
2.55.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH net v2 0/2] ipv4/ipv6: do not warn on route notification size races
2026-10-08 5:29 [PATCH net v2 0/2] ipv4/ipv6: do not warn on route notification size races Daehyeon Ko
2026-10-08 5:29 ` [PATCH net v2 1/2] ipv4: do not warn on route notification size race Daehyeon Ko
2026-10-08 5:29 ` [PATCH net v2 2/2] ipv6: " Daehyeon Ko
@ 2026-10-08 5:35 ` netdev-bot+sinfo
2026-10-08 18:50 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: netdev-bot+sinfo @ 2026-10-08 5:35 UTC (permalink / raw)
To: Daehyeon Ko
Cc: David Ahern, Ido Schimmel, David S . Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Simon Horman, Amit Cohen,
Roopa Prabhu, netdev, linux-kernel
Hi!
This is an automated message. This series looks like a fix, but its
commit messages seem to be missing some information:
- Whether the issue was actually triggered, or is only theoretical
(e.g. found by code inspection). If it was triggered please include
the symptoms, like the stack trace or error messages.
Please do not repost the series just to address the above. Instead,
reply to this email with the missing information, so that reviewers
can take it into account. If the series needs another revision for
other reasons, please include the information in the commit messages
then.
The evaluation is done by an LLM so it may be wrong, if you think
that is the case please reply and explain.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net v2 0/2] ipv4/ipv6: do not warn on route notification size races
2026-10-08 5:29 [PATCH net v2 0/2] ipv4/ipv6: do not warn on route notification size races Daehyeon Ko
` (2 preceding siblings ...)
2026-10-08 5:35 ` [PATCH net v2 0/2] ipv4/ipv6: do not warn on route notification size races netdev-bot+sinfo
@ 2026-10-08 18:50 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-10-08 18:50 UTC (permalink / raw)
To: Daehyeon Ko
Cc: dsahern, idosch, davem, edumazet, kuba, pabeni, horms, amcohen,
roopa, netdev, linux-kernel
Hello:
This series was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Thu, 8 Oct 2026 14:29:21 +0900 you wrote:
> A nexthop group can grow between route notification sizing and filling.
> Both IPv4 and IPv6 can then legitimately return -EMSGSIZE, so remove the
> stale warnings while preserving their existing error paths.
>
> Patch 1 is unchanged from v1. Patch 2 adds the IPv6 counterpart requested
> by Ido. No new build or runtime test was run; both changes only delete the
> stale comment and WARN_ON().
>
> [...]
Here is the summary with links:
- [net,v2,1/2] ipv4: do not warn on route notification size race
https://git.kernel.org/netdev/net/c/e02a5b658816
- [net,v2,2/2] ipv6: do not warn on route notification size race
https://git.kernel.org/netdev/net/c/c97426ec649d
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 5+ messages in thread