Re: [PATCH 2/2] bonding: 3ad: use RCU_INIT_POINTER for rcu pointer initialization
From: Eric Dumazet
Date: Mon Aug 17 2026 - 04:39:21 EST
On Mon, Aug 17, 2026 at 10:33 AM Hangbin Liu <hangbin.liu@xxxxxxxxx> wrote:
>
> From: Hangbin Liu <liuhangbin@xxxxxxxxxx>
>
> 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@xxxxxxxxxx>
> ---
> 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.
pw-bot: cr