* [PATCH net v2 0/2] ipv4/ipv6: do not warn on route notification size races
@ 2026-10-08 5:29 Daehyeon Ko
2026-10-08 5:29 ` [PATCH net v2 1/2] ipv4: do not warn on route notification size race Daehyeon Ko
` (2 more replies)
0 siblings, 3 replies; 4+ 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
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().
---
v2:
- Add the IPv6 counterpart.
v1: <20261007045410.3806739-1-4ncienth@gmail.com>
Daehyeon Ko (2):
ipv4: do not warn on route notification size race
ipv6: do not warn on route notification size race
net/ipv4/fib_trie.c | 2 --
net/ipv6/route.c | 2 --
2 files changed, 4 deletions(-)
base-commit: 23609bce9e1de525d1d0e73fc68c6e7971d0b49e
--
2.55.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [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
2026-10-08 5:35 ` [PATCH net v2 0/2] ipv4/ipv6: do not warn on route notification size races netdev-bot+sinfo
2 siblings, 0 replies; 4+ 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 [flat|nested] 4+ 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
2 siblings, 0 replies; 4+ 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 [flat|nested] 4+ 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
2 siblings, 0 replies; 4+ 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] 4+ messages in thread
end of thread, other threads:[~2026-10-08 5:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH net v2 0/2] ipv4/ipv6: do not warn on route notification size races netdev-bot+sinfo
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®