net: act_gate bug. was: [syzbot] [tomoyo?] [mm?] INFO: rcu detected stall in security_file_ioctl (9)

sashiko-bot at kernel.org sashiko-bot at kernel.org
Tue Nov 24 06:11:20 UTC 2026


Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [High] net/sched: act_gate: missing Signed-off-by trailer in commit
  message
- [Low] net/sched: act_gate: missing Fixes trailer in commit message
--

commit 1dfca74c316eb54b3672929b3411874232eb4ee7
Author: Alexei Starovoitov <ast at kernel.org>

> net: act_gate bug. was: [syzbot] [tomoyo?] [mm?] INFO: rcu detected stall in security_file_ioctl (9)
>
> On Mon, Nov 23, 2026 at 08:45 PM syzbot <syzbot+b6f8640465bdf47ca708 at syzkaller.appspotmail.com> wrote:
> > rcu:           hardirqs   softirqs   csw/system
> > rcu:   number:     5264          0            0
> > rcu:  cputime:      138      52351           25   ==> 52490(ms)
>
> It's not tomoyo, mm or bpf. Looks like act_gate.
> Zero new softirqs in 52 sec, so one hrtimer_run_softirq() doesn't return.
>
> > RBP: ffff88807ed35538 R08: ffffffff91be1bbf R09: 1ffffffff237c377
> > R10: dffffc0000000000 R11: fffffbfff237c378 R12: ffff8880b8228600
> > R13: ffffffff89fd0480 R14: ffff8880b8228600 R15: 1ffff1101704514a
>
> The registers with lockdep struct sizes:
>
>   reg       value             points to
>   --------  ----------------  --------------------------------------
>   R14       ffff8880b8228600  cpu_base
>   R15 << 3  ffff8880b8228a50  clock_base[HRTIMER_BASE_TAI_SOFT].seq
>   RBP       ffff88807ed35538  kmalloc-512 + 0x138, tcf_gate->hitimer
>
> act_gate has the only soft hrtimer that can be on CLOCK_TAI.
> bpf_timer_init() rejects that clock.
>
> TCA_GATE_CYCLE_TIME is an unchecked u64. In gate_timer_func():
>
>   n = div64_u64(ktime_sub_ns(now, base), cycle);
>   close_time = ktime_add_ns(base, (n + 1) * cycle);
>
> With base = 0 and cycle = U64_MAX, n is 0 and close_time is -1.
> The timer restarts in the past and __hrtimer_run_queues() runs it again.
> It's there since
> commit a51c328df310 ("net: qos: introduce a gate control flow action").
>
> Jamal,
> taprio's INT_MAX limit doesn't fit. tdc uses cycle-time of 600 sec.
> The diff saturates the sum instead.
> Here is a potential fix:

[Severity: High]
The commit message is missing a Signed-off-by: trailer.

[Severity: Low]
Since this fixes an infinite softirq loop when TCA_GATE_CYCLE_TIME overflows
the timer expiration timestamp, should this include a Fixes: trailer?

  Fixes: a51c328df310 ("net: qos: introduce a gate control flow action")

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/DN37NBGPJJG9.2DSVDCKS3UYTV@gmail.com?part=1



More information about the Linux-security-module-archive mailing list