From: Hangbin Liu <hangbin.liu@linux.dev>
To: Eric Dumazet <edumazet@google.com>
Cc: Jay Vosburgh <jv@jvosburgh.net>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Hangbin Liu <liuhangbin@gmail.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Hangbin Liu <liuhangbin@kylinos.cn>
Subject: Re: [PATCH 2/2] bonding: 3ad: use RCU_INIT_POINTER for rcu pointer initialization
Date: Mon, 17 Aug 2026 17:23:03 +0800 [thread overview]
Message-ID: <aoLS968kX0QQH0KT@fedora> (raw)
In-Reply-To: <CANn89iLyiyRM4K4GnjuukdDhOWFiWWjuS5aVbP-u8iPqPxZtEg@mail.gmail.com>
On Mon, Aug 17, 2026 at 10:37:56AM +0200, Eric Dumazet wrote:
> On Mon, Aug 17, 2026 at 10:33 AM Hangbin Liu <hangbin.liu@linux.dev> wrote:
> >
> > From: Hangbin Liu <liuhangbin@kylinos.cn>
> >
> > Use RCU_INIT_POINTER() for initializing port->aggregator to NULL.
> >
> > Fixes: c4f050ce06c5 ("bonding: 3ad: implement proper RCU rules for port->aggregator")
> > Signed-off-by: Hangbin Liu <liuhangbin@kylinos.cn>
> > ---
> > drivers/net/bonding/bond_3ad.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
> > index 196830fca4a4..c4dfcafcff26 100644
> > --- a/drivers/net/bonding/bond_3ad.c
> > +++ b/drivers/net/bonding/bond_3ad.c
> > @@ -2075,7 +2075,7 @@ static void ad_initialize_port(struct port *port, const struct bond_params *bond
> > port->sm_mux_state = 0;
> > port->sm_mux_timer_counter = 0;
> > port->sm_tx_state = 0;
> > - port->aggregator = NULL;
> > + RCU_INIT_POINTER(port->aggregator, NULL);
> > port->next_port_in_aggregator = NULL;
> > port->transaction_id = 0;
> >
>
> This is a NOP really, the object is not visible yet.
OH, I see. Sorry for bothering you.
Hangbin
prev parent reply other threads:[~2026-08-17 9:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-17 8:32 [PATCH 0/2] bonding: 3ad: fix 2 RCU issues in ad_mux_machine() Hangbin Liu
2026-08-17 8:32 ` [PATCH 1/2] bonding: 3ad: fix NULL pointer dereference " Hangbin Liu
2026-08-17 8:32 ` [PATCH 2/2] bonding: 3ad: use RCU_INIT_POINTER for rcu pointer initialization Hangbin Liu
2026-08-17 8:37 ` Eric Dumazet
2026-08-17 9:23 ` Hangbin Liu [this message]
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=aoLS968kX0QQH0KT@fedora \
--to=hangbin.liu@linux.dev \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jv@jvosburgh.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liuhangbin@gmail.com \
--cc=liuhangbin@kylinos.cn \
--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
all inboxes | Powered by JetHome®