Re: [PATCH v2 net] bonding: only set speed/duplex to unknown, if getting speed failed
From: Nikolay Aleksandrov
Date: Tue Feb 03 2026 - 13:50:35 EST
On 03/02/2026 16:11, 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>
---
v2: corrected fixes tag
v1: https://lore.kernel.org/all/20260130111904.144024-1-tbogendoerfer@xxxxxxx/
drivers/net/bonding/bond_main.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
Please CC all people who were involved in the previous patch version review.
Looks good to me,
Reviewed-by: Nikolay Aleksandrov <razor@xxxxxxxxxxxxx>