[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pr4njxDDR8e9tElhovQfunuoyxlxUQdZqfdGBZg028rsKLPq4w1aYIUNKcAlF9EuqQHZjoj-9ocK2wEltjyQoRhUvsoKyZYveLK3oCAAd4k=@1g4.org>
Date: Sat, 31 Jan 2026 15:00:23 +0000
From: Paul Moses <p@....org>
To: Victor Nogueira <victor@...atatu.com>
Cc: netdev@...r.kernel.org, Jamal Hadi Salim <jhs@...atatu.com>, Cong Wang <xiyou.wangcong@...il.com>, Jiri Pirko <jiri@...nulli.us>, "David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, Simon Horman <horms@...nel.org>, linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH net v3 6/7] net/sched: act_gate: reject empty schedule list
Ok, just to confirm the intended behavior changes compared to what is currently in the tree:
create missing entry list FAIL (got -22, expected 0)
create empty entry list FAIL (got -22, expected 0)
replace append entries REPLACE append failed: expected 2 entries, got 1
FAIL (got -22, expected 0)
- CREATE with missing or empty entry list now returns -EINVAL
Previously, CREATE could appear to succeed if cycle_time was
provided even with no entries, but it still left an
empty schedule and later called list_first_entry() at
net/sched/act_gate.c:552, which is unsafe. Returning -EINVAL here is the
correct behavior fix.
- REPLACE now replaces the schedule, it does not append
The old append behavior was an accident caused by reusing the same list and
never clearing it. With the RCU snapshot change, a fresh schedule is built
and swapped atomically, so providing a new entry list on REPLACE replaces
the old one and avoids stale data.
- REPLACE with an empty entry list keeps the old schedule
Thanks,
Paul
Powered by blists - more mailing lists