Re: [PATCH net] ipv4: do not warn on route notification size race
From: Ido Schimmel
Date: Wed Oct 07 2026 - 08:45:24 EST
On Wed, Oct 07, 2026 at 01:54:10PM +0900, Daehyeon Ko wrote:
> 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@xxxxxxxxxx>
> Link: https://lore.kernel.org/netdev/20261004082043.GB92032@shredder/
> Suggested-by: Ido Schimmel <idosch@xxxxxxxxxx>
> Cc: stable@xxxxxxxxxxxxxxx
> Assisted-by: LLM
> Signed-off-by: Daehyeon Ko <4ncienth@xxxxxxxxx>
> ---
> No new build or runtime test was run. This is the exact two-line deletion
> suggested in the linked review.
The previous series was IPv4-specific and I forgot that
fib6_info_hw_flags_set() has the same problem. Please include the IPv6
fix as patch 2 of v2. Wait 24h before posting per:
https://docs.kernel.org/next/process/maintainer-netdev.html