[PATCH net v6 0/1] net/sched: act_gate: snapshot parameters with RCU on replace
From: Paul Moses
Date: Fri Feb 13 2026 - 06:39:52 EST
This series fixes a schedule lifetime race in `act_gate` between the
control-plane replace path and the running hrtimer callback
(`gate_timer_func`).
Changes since v5:
- Reset stale err before optional old-entry copy on REPLACE
- Centralize goto_ch cleanup at release_idr for init error unwinding
- Snapshot replace defaults from old params once
- Drop redundant early clockid pre-validation and remove clockid_provided
- Resolve clockid once into tk_offset and pass clockid/tk_offset as scalars
- Deduplicate init error cleanup by falling through shared
err_free/release_idr
- Deduplicate empty entry list rejection on create into a single check
- Rename lock-only accessor helper to tcf_gate_params_locked()
- Simplify entry-list handling by deriving use_old_entries from attributes
- Remove replace-path defensive old_p NULL handling
- Keep helper name gate_setup_timer()
- Align cleanup dereference with act_vlan using
rcu_dereference_protected(gact->param, 1) and call_rcu()
- Switch dump to lockless RCU read-side access and use
READ_ONCE(gact->tcf_action)
- Compute need_cancel only on replace and keep
gate_timer_needs_cancel() focused
Paul Moses (1):
net/sched: act_gate: snapshot parameters with RCU on replace
include/net/tc_act/tc_gate.h | 33 ++++-
net/sched/act_gate.c | 275 ++++++++++++++++++++++++-----------
2 files changed, 219 insertions(+), 89 deletions(-)
--
2.53.0