Re: [PATCH v2] net/sched: act_gate: Limit the max value for cycletime

From
Edward Adam Davis <hidden>
Date
2026-08-25 09:01:20
Also in
lkml
Reply to
Jamal Hadi Salim, 2026-08-25
On Tue, 25 Aug 2026 04:25:04 -0400, Jamal Hadi Salim [off-list ref] wrote:
On Sun, Aug 23, 2026 at 12:07 AM Edward Adam Davis [off-list ref] wrote:
quoted
If the user passes a cycletime value of 0xFFFFFFFFFFFFFFFFULL,
an overflow occurs during the assignment of cycle in gate_timer_func():

cycle = p->tcfg_cycletime; // overflow, cycle = -1

Since the local variable cycle is declared as ktime_t (i.e., s64),
the assignment overflows.
Review the sashiko feedback. At least two of those concerns look legit
and need to be addressed:
1) complaint about timer disarm on replace 2) INT_MAX being too narrow
I haven't received any feedback regarding sashiko, and I didn't quite
understand the points made in item 1); could you please provide more
details?

Regarding item 2), if INT_MAX is too narrow, do you have a suitable value
to recommend? S64_MAX?

cheers,
Edward
Thread (10 messages) 10 messages, 3 authors, last reply 2026-08-27
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help