Netdev List
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Eric Dumazet <edumazet@google.com>,
	"David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>
Cc: 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: Tue, 1 Sep 2026 12:26:29 +0200	[thread overview]
Message-ID: <bddad244-f4a9-4e3b-ab6e-9ca8886f1eb6@redhat.com> (raw)
In-Reply-To: <20260831081027.3209554-1-edumazet@google.com>

On 8/31/26 10:10 AM, 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>
Clashiko noted there is still a missing READ_ONCE annotation for
`usable_slaves->count` in bond_miimon_inspect(), but I think that is
better handled with a separate patch.

/P


  parent reply	other threads:[~2026-09-01 10:26 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
2026-09-01 10:26 ` Paolo Abeni [this message]
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=bddad244-f4a9-4e3b-ab6e-9ca8886f1eb6@redhat.com \
    --to=pabeni@redhat.com \
    --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 \
    /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