From: sashiko-bot@kernel.org
To: "Hangbin Liu" <hangbin.liu@linux.dev>
Cc: bpf@vger.kernel.org
Subject: Re: [PATCH net-next 2/6] bonding: finish XDP setup before publishing the slave
Date: Sat, 14 Nov 2026 14:06:51 +0000 [thread overview]
Message-ID: <sashiko-outbox-214604@kernel.org> (raw)
In-Reply-To: <20261113-bond_enslave_restruct-v1-2-364c549e78db@kylinos.cn>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] bonding: missing Fixes trailers for bond_enslave() XDP error
leaks
--
commit 48b54e99e17c93fa370e6459ec403b3e7a7d7c19
Author: Hangbin Liu <hangbin.liu@linux.dev>
> bonding: finish XDP setup before publishing the slave
>
> bond_enslave() currently runs the fallible XDP setup
> (dev_xdp_propagate()) after the slave has already been published:
> slave_cnt is incremented, ns maddrs are added and the active slave
> may have been selected. If XDP setup then fails, the error path
> jumps to err_sysfs_del and leaks:
>
> - the promiscuity/allmulti increments and synced addresses applied
> to the slave earlier in the function, which are only undone on
> an immediate allmulti failure,
> - the ns maddrs added just before the failure, which no enslave
> error path ever removes.
>
> Move dev_xdp_propagate() to the last fallible step, right after the
> promiscuity/allmulti/address-sync block and before
> WRITE_ONCE(bond->slave_cnt), so that no handled fallible call
> follows the publication of the slave and a failure can no longer
> leak slave_cnt or ns maddrs.
>
> bond_xdp_set_features() is moved along with this reordering so XDP
> features are updated before the slave is published. Route the XDP
> failure through a new err_set_xdp label that undoes the promiscuity,
> allmulti and address-sync state, mirroring what __bond_release_one()
> does.
>
> Signed-off-by: Hangbin Liu <liuhangbin@kylinos.cn>
[Severity: Low]
Since this fixes the promiscuity/allmulti/address-sync and IPv6 NS
target multicast address leaks on the XDP setup failure path in
bond_enslave(), should the commit message include Fixes tags?
Fixes: 9e2ee5c7e7c3 ("net, bonding: Add XDP support to the bonding driver")
Fixes: 8eb36164d1a6 ("bonding: add ns target multicast address to slave device")
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261113-bond_enslave_restruct-v1-0-364c549e78db@kylinos.cn?part=2
next prev parent reply other threads:[~2026-11-14 14:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-13 14:04 [PATCH net-next 0/6] bonding: refactor bond_enslave() to fix XDP ordering and error rollback Hangbin Liu
2026-11-13 14:04 ` [PATCH net-next 1/6] bonding: check XDP support before enslaving changes state Hangbin Liu
2026-11-14 14:06 ` sashiko-bot
2026-11-13 14:04 ` [PATCH net-next 2/6] bonding: finish XDP setup before publishing the slave Hangbin Liu
2026-11-14 14:06 ` sashiko-bot [this message]
2026-11-13 14:04 ` [PATCH net-next 3/6] bonding: complete rollback of bond_enslave() error paths Hangbin Liu
2026-11-14 14:06 ` sashiko-bot
2026-11-13 14:04 ` [PATCH net-next 4/6] bonding: factor out slave publication Hangbin Liu
2026-11-13 14:04 ` [PATCH net-next 5/6] bonding: factor out XDP slave check Hangbin Liu
2026-11-13 14:04 ` [PATCH net-next 6/6] bonding: factor out bond_enslave_validate Hangbin Liu
2026-11-13 14:11 ` [PATCH net-next 0/6] bonding: refactor bond_enslave() to fix XDP ordering and error rollback netdev-bot+sinfo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-214604@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=hangbin.liu@linux.dev \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox