]> git.ipfire.org Git - thirdparty/linux.git/commit
net/sched: act_gate: snapshot parameters with RCU on replace
authorPaul Moses <p@1g4.org>
Mon, 23 Feb 2026 15:05:44 +0000 (15:05 +0000)
committerJakub Kicinski <kuba@kernel.org>
Sat, 28 Feb 2026 00:10:36 +0000 (16:10 -0800)
commit62413a9c3cb183afb9bb6e94dd68caf4e4145f4c
tree57e9ec82e03a46b767dc624a3426212099d51c50
parentbe11a537224d72b906db6b98510619770298c8a4
net/sched: act_gate: snapshot parameters with RCU on replace

The gate action can be replaced while the hrtimer callback or dump path is
walking the schedule list.

Convert the parameters to an RCU-protected snapshot and swap updates under
tcf_lock, freeing the previous snapshot via call_rcu(). When REPLACE omits
the entry list, preserve the existing schedule so the effective state is
unchanged.

Fixes: a51c328df310 ("net: qos: introduce a gate control flow action")
Cc: stable@vger.kernel.org
Signed-off-by: Paul Moses <p@1g4.org>
Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Reviewed-by: Victor Nogueira <victor@mojatatu.com>
Link: https://patch.msgid.link/20260223150512.2251594-2-p@1g4.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/tc_act/tc_gate.h
net/sched/act_gate.c