public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Xiang Mei <xmei5@asu.edu>, security@kernel.org
Cc: netdev@vger.kernel.org, jv@jvosburgh.net, andrew+netdev@lunn.ch,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	bestswngs@gmail.com
Subject: Re: [PATCH net v3] net: bonding: fix use-after-free in bond_xmit_broadcast()
Date: Tue, 31 Mar 2026 10:53:12 +0200	[thread overview]
Message-ID: <88cdb95a-3bb0-4e97-9fd2-a6ef9911edb2@redhat.com> (raw)
In-Reply-To: <20260326075553.3960562-1-xmei5@asu.edu>

On 3/26/26 8:55 AM, Xiang Mei wrote:
> diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
> index 33f414d03ab91..a5484d11553d1 100644
> --- a/drivers/net/bonding/bond_main.c
> +++ b/drivers/net/bonding/bond_main.c
> @@ -5326,7 +5326,7 @@ static netdev_tx_t bond_xmit_broadcast(struct sk_buff *skb,
>  		if (!(bond_slave_is_up(slave) && slave->link == BOND_LINK_UP))
>  			continue;
>  
> -		if (bond_is_last_slave(bond, slave)) {
> +		if (i + 1 == slaves_count) {
>  			skb2 = skb;
>  			skb_used = true;
>  		} else {

The above removes the last usage of the bond_is_last_slave() helper,
which in turn could/should be removed, too. To avoid delaying this patch
too much I'm applying it as is, but please follow-up on net-next
removing the stray helper after this patch will land there (i.e. after
Thursday).

Thanks,

Paolo


  reply	other threads:[~2026-03-31  8:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-26  7:55 [PATCH net v3] net: bonding: fix use-after-free in bond_xmit_broadcast() Xiang Mei
2026-03-31  8:53 ` Paolo Abeni [this message]
2026-03-31  9:00 ` patchwork-bot+netdevbpf

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=88cdb95a-3bb0-4e97-9fd2-a6ef9911edb2@redhat.com \
    --to=pabeni@redhat.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=bestswngs@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jv@jvosburgh.net \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=security@kernel.org \
    --cc=xmei5@asu.edu \
    /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