Re: [PATCH v2 net] bonding: only set speed/duplex to unknown, if getting speed failed
From: Hangbin Liu
Date: Tue Feb 03 2026 - 20:16:53 EST
On Tue, Feb 03, 2026 at 03:11:52PM +0100, Thomas Bogendoerfer wrote:
> bond_update_speed_duplex() first set speed/duplex to unknown and
> then asks slave driver for current speed/duplex. Since getting
> speed/duplex might take longer there is a race, where this false state
> is visible by /proc/net/bonding. With commit 691b2bf14946 ("bonding:
> update port speed when getting bond speed") this race gets more visible,
> if user space is calling ethtool on a regular base.
>
> Fix this by only setting speed/duplex to unknown, if link speed is
> really unknown/unusable.
>
> Fixes: 98f41f694f46 ("bonding:update speed/duplex for NETDEV_CHANGE")
> Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@xxxxxxx>
Reviewed-by: Hangbin Liu <liuhangbin@xxxxxxxxx>