mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Krystian Kaniewski <krystianmkaniewski@gmail.com>
To: Vinicius Costa Gomes <vinicius.gomes@intel.com>,
	Jamal Hadi Salim <jhs@mojatatu.com>,
	Jiri Pirko <jiri@resnulli.us>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: Simon Horman <horms@kernel.org>,
	Vladimir Oltean <vladimir.oltean@nxp.com>,
	Vedang Patel <vedang.patel@intel.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH net v3 0/3] net/sched: taprio: fix RCU stall from replayed schedule entries
Date: Wed,  4 Nov 2026 15:17:10 +0100	[thread overview]
Message-ID: <20261104141713.355958-1-krystianmkaniewski@gmail.com> (raw)

syzbot reported an RCU stall with a software taprio schedule made of a
single 127 ns entry. When advance_sched() falls behind, it replays every
missed entry inside the timer interrupt and the backlog only grows.
Patch 3 makes it continue from the entry in progress instead.

Patch 2 fixes a pre-existing wrap of the cycle-time-extension sum in the
software and txtime-assist paths. Patch 3 relies on it. Patch 1 prevents
a saturated extension from handing over to an admin schedule whose
software timestamps cannot be represented.

AI coding assistants helped with analysis, patch drafting and review.
The submitter reviewed the complete series and is responsible for it.

v3:
 - patch 2: split the cycle-time-extension overflow handling from patch 3
   as suggested by Vinicius, and use the same saturating helper in
   get_interval_end_time()
 - patch 3: return the cycle end from taprio_entry_at() and update
   cycle_end_time in advance_sched() (Vinicius)
 - patch 1: reword the range-check comment to describe only software
   timer timestamps (Vinicius)
 - all patches: add Acked-by from Vinicius, drop the obsolete
   Assisted-by trailers, and rebase onto current net/main
v2: https://lore.kernel.org/all/20261009123309.284193-1-krystianmkaniewski@gmail.com/
v1: https://lore.kernel.org/all/20261006113335.241564-1-krystianmkaniewski@gmail.com/

Krystian Kaniewski (3):
  net/sched: taprio: reject software schedules that overflow their
    timestamps
  net/sched: taprio: prevent cycle time extension overflow
  net/sched: taprio: do not replay missed entries in advance_sched()

 net/sched/sch_taprio.c | 191 ++++++++++++++++++++++++++++++++++++-----
 1 file changed, 168 insertions(+), 23 deletions(-)


base-commit: 241dec6f9ab74d8c3ef246764f3611666b96b9e1
-- 
2.53.0


             reply	other threads:[~2026-11-04 14:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-04 14:17 Krystian Kaniewski [this message]
2026-11-04 14:17 ` [PATCH net v3 1/3] net/sched: taprio: reject software schedules that overflow their timestamps Krystian Kaniewski
2026-11-04 14:17 ` [PATCH net v3 2/3] net/sched: taprio: prevent cycle time extension overflow Krystian Kaniewski
2026-11-04 14:17 ` [PATCH net v3 3/3] net/sched: taprio: do not replay missed entries in advance_sched() Krystian Kaniewski

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=20261104141713.355958-1-krystianmkaniewski@gmail.com \
    --to=krystianmkaniewski@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --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=vedang.patel@intel.com \
    --cc=vinicius.gomes@intel.com \
    --cc=vladimir.oltean@nxp.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

all inboxes | Powered by JetHome®