Re: [PATCH net] bonding: fix missing down path on speed/duplex failure after FAIL->UP

From: Timur Stukan

Date: Fri Oct 23 2026 - 08:38:59 EST


On Fri, 23 Oct 2026 at 10:48, Hangbin Liu <hangbin.liu@xxxxxxxxx> wrote:

> > static void bond_miimon_commit(struct bonding *bond)
> > {
> > struct slave *slave, *primary, *active;
> > @@ -2807,10 +2828,21 @@ static void bond_miimon_commit(struct bonding *bond)
> > err = bond_update_speed_duplex(slave);
> > netdev_unlock_ops(slave->dev);
> > if (err && bond_needs_speed_duplex(bond)) {
> > - slave->link = BOND_LINK_DOWN;
>
> Hmm, this issue only happens when link_state is on
>
> netif_running(slave->dev) && netif_carrier_ok(slave->dev);
>
> while !netif_device_present. Should we set the link up when device detached?


Hi Hangbin,

Thanks for the review and the suggestion.

A detached device is one way to get there, but it does not cover all
the ways to hit this bug. In particular, it does not cover the case i
reproduced: during inspect both link_state and netif_device_present()
are true, but the carrier is lost after inspect and before commit, so
reading speed/duplex fails in commit.


Thanks,
Timur