Re: [PATCH net-next v3] net: sched: act_gact: use acquire/release for tcfg_ptype

From: Jakub Kicinski

Date: Sat Sep 05 2026 - 16:45:29 EST


On Wed, 2 Sep 2026 15:16:59 +0800 Jinjie Ruan wrote:
> @@ -160,7 +155,8 @@ TC_INDIRECT_SCOPE int tcf_gact_act(struct sk_buff *skb,
>
> #ifdef CONFIG_GACT_PROB
> {
> - u32 ptype = READ_ONCE(gact->tcfg_ptype);
> + /* Pairs with smp_store_release() in tcf_gact_init() */
> + u32 ptype = smp_load_acquire(&gact->tcfg_ptype);
>
> if (ptype)
> action = gact_rand[ptype](gact);

Clashiko points out that you are turning what used to be a conditional
barrier into one that's always obeyed, even if ptype is 0.
--
pw-bot: cr