Netdev List
 help / color / mirror / Atom feed
From: Hangbin Liu <hangbin.liu@linux.dev>
To: Eric Dumazet <edumazet@google.com>
Cc: "David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	netdev@vger.kernel.org, eric.dumazet@gmail.com,
	Jay Vosburgh <jv@jvosburgh.net>
Subject: Re: [PATCH net] net: bonding: annotate lockless writes with WRITE_ONCE()
Date: Mon, 31 Aug 2026 17:44:46 +0800	[thread overview]
Message-ID: <apVNDttw4HSn3cEg@fedora> (raw)
In-Reply-To: <20260831081027.3209554-1-edumazet@google.com>

On Mon, Aug 31, 2026 at 08:10:27AM +0000, Eric Dumazet wrote:
> Several fields in bonding are read locklessly using READ_ONCE()
> (or ACCESS_ONCE() previously) but have corresponding writes that
> do not use WRITE_ONCE().
> 
> Add WRITE_ONCE() annotations to:
> - bond->send_peer_notif decrements in bond_peer_notify_may_events()
>   and reset in bond_close().
> - bond->slave_cnt increments and decrements in bond_enslave() and
>   __bond_release_one().
> - bond->recv_probe updates in bond_open(), bond_option_arp_interval_set()
>   and rlb_initialize().
> - slaves->count decrement in bond_skip_slave().
> 
> Fixes: 4d97480b1806 ("bonding: use local function pointer of bond->recv_probe in bond_handle_frame")
> Fixes: 9a72c2da690d ("bonding: fix div by zero while enslaving and transmitting")
> Fixes: ee6377147409 ("bonding: Simplify the xmit function for modes that use xmit_hash")
> Fixes: 429208aab9db ("net: bonding: add the READ_ONCE/WRITE_ONCE for outside lock accessing")
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: Jay Vosburgh <jv@jvosburgh.net>

Reviewed-by: Hangbin Liu <liuhangbin@kylinos.cn>

  parent reply	other threads:[~2026-08-31  9:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-31  8:10 [PATCH net] net: bonding: annotate lockless writes with WRITE_ONCE() Eric Dumazet
2026-08-31  9:43 ` Xuanqiang Luo
2026-08-31  9:44 ` Hangbin Liu [this message]
2026-09-01 10:26 ` Paolo Abeni
2026-09-01 10:30 ` 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=apVNDttw4HSn3cEg@fedora \
    --to=hangbin.liu@linux.dev \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=horms@kernel.org \
    --cc=jv@jvosburgh.net \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /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