public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Moses <p@1g4.org>
To: Victor Nogueira <victor@mojatatu.com>,
	Jamal Hadi Salim <jhs@mojatatu.com>,
	Cong Wang <xiyou.wangcong@gmail.com>,
	Jiri Pirko <jiri@resnulli.us>
Cc: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Paul Moses <p@1g4.org>
Subject: [PATCH net v5 0/1] net/sched: act_gate: snapshot parameters with RCU on replace
Date: Thu, 05 Feb 2026 15:10:23 +0000	[thread overview]
Message-ID: <20260205150958.412278-1-p@1g4.org> (raw)

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 v4:
- Drop the gate_clockid_to_offset helper, validate clockid once, and set
  tk_offset in one place.
- Seed missing attrs from the old params when entries are replaced
- Reimplemented the timer cancel from RCU snapshot and cancel before taking tcf_lock.
- Reuse a single protected deref under tcf_lock
- Compare old/new values directly in gate_timer_needs_cancel()
- Cleanup no longer assumes rtnl_lock

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         | 266 ++++++++++++++++++++++++++---------
 2 files changed, 228 insertions(+), 71 deletions(-)

-- 
2.52.GIT


             reply	other threads:[~2026-02-05 15:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-05 15:10 Paul Moses [this message]
2026-02-05 15:10 ` [PATCH net v5 1/1] net/sched: act_gate: snapshot parameters with RCU on replace Paul Moses
2026-02-06 10:36   ` Victor Nogueira
2026-02-12 12:17     ` Paul Moses
2026-02-12 14:59       ` Victor Nogueira

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260205150958.412278-1-p@1g4.org \
    --to=p@1g4.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=victor@mojatatu.com \
    --cc=xiyou.wangcong@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox