Re: [PATCH net v2] bonding: fix slave_cnt leak on XDP error paths

From: Hangbin Liu

Date: Thu Sep 03 2026 - 22:01:54 EST


On Thu, Sep 03, 2026 at 02:53:29PM +0300, Nikolay Aleksandrov wrote:
> Waaait a second, it is moved after slave arr update, yes that would cause those.
> I missed it in the review, in my suggestion I specifically said it must be before
> the slave array update because it uses slave_cnt.
>
> It must be moved up. :)

Ah, I thought all the code between netdev_ops->ndo_bpf and
bond_xdp_set_features() are xdp stuff and missed the bond_update_slave_arr()
in the middle...

I need more careful when go though the code and do testing even with simplest
change.

Thanks
Hangbin