Re: [PATCH 2/2] bonding: 3ad: use RCU_INIT_POINTER for rcu pointer initialization

Hangbin Liu <[email protected]>
Newsgroups org.kernel.vger.linux-kernel,org.kernel.vger.netdev
Message-ID <aoLS968kX0QQH0KT@fedora>
On Mon, Aug 17, 2026 at 10:37:56AM +0200, Eric Dumazet wrote:
> On Mon, Aug 17, 2026 at 10:33 AM Hangbin Liu <[email protected]> wrote:
> >
> > From: Hangbin Liu <[email protected]>
> >
> > 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 <[email protected]>
> > ---
> >  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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.