[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CA+NMeC-wBDTvwvxAy5Za5Dq0wXpqYHNVPV_wKk-kfpSyAWCPPw@mail.gmail.com>
Date: Wed, 21 Jan 2026 09:42:53 -0300
From: Victor Nogueira <victor@...atatu.com>
To: Paul Moses <p@....org>
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 1/2] net/sched: act_gate: fix schedule updates with RCU swap
On Tue, Jan 20, 2026 at 10:00 PM Paul Moses <p@....org> wrote:
>
> > Also, the AI review [2] pointed out a real issue.
> > It's easy to reproduce by running something like:
> >
> > tc action add action gate base-time 200000000000ns \
> > sched-entry close 0ns index 10
>
> This was never allowed. A zero interval has always been invalid for a gate schedule entry
The issue is not whether this is valid or not (as you said, it isn't).
The issue is that, with your patch, this will result in a null-ptr deref.
You can avoid this by initialising the timer before calling tcf_idr_release.
> [...]
> I will prepare and test v3 with your first 8 suggestions and await further input on best practices for avoiding a monolithic patch and on appropriate levels of validation in this specific case.
Ok, the main suggestion is to logically break down (as much as possible),
the introduction of RCU and the other additional cleanups/checks.
cheers,
Victor
Powered by blists - more mailing lists