* [syzbot] [kernfs?] [mm?] INFO: rcu detected stall in kernfs_fop_open (7)
@ 2025-07-28 23:27 syzbot
2026-08-11 13:42 ` Forwarded: [syz test] net/sched: taprio: reject too-small software schedule intervals syzbot
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: syzbot @ 2025-07-28 23:27 UTC (permalink / raw)
To: gregkh, linux-kernel, linux-mm, syzkaller-bugs, tj
Hello,
syzbot found the following issue on:
HEAD commit: 25fae0b93d1d Merge tag 'drm-fixes-2025-07-24' of https://g..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=11a5bfd4580000
kernel config: https://syzkaller.appspot.com/x/.config?x=a4bcc0a11b3192be
dashboard link: https://syzkaller.appspot.com/bug?extid=19d01f6082ec61dd45b2
compiler: Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1656bb82580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=15a070a2580000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/26a32daab34b/disk-25fae0b9.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/44b0af5dddac/vmlinux-25fae0b9.xz
kernel image: https://storage.googleapis.com/syzbot-assets/0687991f0381/bzImage-25fae0b9.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+19d01f6082ec61dd45b2@syzkaller.appspotmail.com
rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
rcu: 0-...!: (1 ticks this GP) idle=375c/1/0x4000000000000000 softirq=18409/18409 fqs=0
rcu: Tasks blocked on level-0 rcu_node (CPUs 0-1): P5512/1:b..l
rcu: (detected by 1, t=10502 jiffies, g=12441, q=623 ncpus=2)
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 UID: 0 PID: 5955 Comm: udevd Not tainted 6.16.0-rc7-syzkaller-00034-g25fae0b93d1d #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
RIP: 0010:hlock_class kernel/locking/lockdep.c:234 [inline]
RIP: 0010:__lock_acquire+0xa4f/0xd20 kernel/locking/lockdep.c:5237
Code: e5 ff 90 0f 0b 90 90 90 31 c0 48 8b 3c 24 48 83 78 40 00 0f 84 8c 02 00 00 41 8b 46 20 25 ff 1f 00 00 48 0f a3 05 f1 3a 09 12 <73> 10 48 69 c0 c8 00 00 00 48 8d 80 f0 82 48 93 eb 40 83 3d 38 ca
RSP: 0018:ffffc90000007b70 EFLAGS: 00000003
RAX: 000000000000006d RBX: 0000000000000001 RCX: 00000000ab2b819a
RDX: 00000000001bf57d RSI: 00000000f5f6d907 RDI: ffff888061b90000
RBP: 0000000000000001 R08: 0000000000000000 R09: ffffffff81ae7962
R10: dffffc0000000000 R11: fffffbfff1f43b9f R12: 000000000000006e
R13: ffff888061b90af0 R14: ffff888061b90b18 R15: 4d4df099ab2b819a
FS: 00007fe3e1610880(0000) GS:ffff888125c23000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f509ec85f98 CR3: 0000000032c5c000 CR4: 00000000003526f0
Call Trace:
<IRQ>
lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5871
__raw_spin_lock_irq include/linux/spinlock_api_smp.h:119 [inline]
_raw_spin_lock_irq+0xa2/0xf0 kernel/locking/spinlock.c:170
__run_hrtimer kernel/time/hrtimer.c:1765 [inline]
__hrtimer_run_queues+0x602/0xc60 kernel/time/hrtimer.c:1825
hrtimer_interrupt+0x45b/0xaa0 kernel/time/hrtimer.c:1887
local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1039 [inline]
__sysvec_apic_timer_interrupt+0x108/0x410 arch/x86/kernel/apic/apic.c:1056
instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1050 [inline]
sysvec_apic_timer_interrupt+0xa1/0xc0 arch/x86/kernel/apic/apic.c:1050
</IRQ>
<TASK>
asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702
RIP: 0010:native_save_fl arch/x86/include/asm/irqflags.h:26 [inline]
RIP: 0010:arch_local_save_flags arch/x86/include/asm/irqflags.h:109 [inline]
RIP: 0010:arch_local_irq_save arch/x86/include/asm/irqflags.h:127 [inline]
RIP: 0010:lock_acquire+0xc9/0x360 kernel/locking/lockdep.c:5867
Code: 01 11 85 c0 0f 85 eb 00 00 00 65 48 8b 04 25 08 d0 9f 92 83 b8 ec 0a 00 00 00 0f 85 d5 00 00 00 48 c7 44 24 30 00 00 00 00 9c <8f> 44 24 30 4c 89 74 24 10 4d 89 fe 4c 8b 7c 24 30 fa 48 c7 c7 20
RSP: 0018:ffffc90003197290 EFLAGS: 00000246
RAX: ffff888061b90000 RBX: 0000000000000000 RCX: 0d0c881f9d5e1900
RDX: 0000000000000000 RSI: ffffffff8172ab02 RDI: 1ffffffff1c27e1c
RBP: ffffffff8172aae5 R08: 0000000000000000 R09: 0000000000000000
R10: ffffc90003197458 R11: ffffffff81acfe40 R12: 0000000000000002
R13: ffffffff8e13f0e0 R14: 0000000000000000 R15: 0000000000000000
rcu_lock_acquire include/linux/rcupdate.h:331 [inline]
rcu_read_lock include/linux/rcupdate.h:841 [inline]
class_rcu_constructor include/linux/rcupdate.h:1155 [inline]
unwind_next_frame+0xc2/0x2390 arch/x86/kernel/unwind_orc.c:479
arch_stack_walk+0x11c/0x150 arch/x86/kernel/stacktrace.c:25
stack_trace_save+0x9c/0xe0 kernel/stacktrace.c:122
kasan_save_stack mm/kasan/common.c:47 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:68
poison_kmalloc_redzone mm/kasan/common.c:377 [inline]
__kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:394
kasan_kmalloc include/linux/kasan.h:260 [inline]
__kmalloc_cache_noprof+0x230/0x3d0 mm/slub.c:4359
kmalloc_noprof include/linux/slab.h:905 [inline]
kzalloc_noprof include/linux/slab.h:1039 [inline]
kernfs_fop_open+0x397/0xca0 fs/kernfs/file.c:623
do_dentry_open+0xdf0/0x1970 fs/open.c:964
vfs_open+0x3b/0x340 fs/open.c:1094
do_open fs/namei.c:3896 [inline]
path_openat+0x2ee5/0x3830 fs/namei.c:4055
do_filp_open+0x1fa/0x410 fs/namei.c:4082
do_sys_openat2+0x121/0x1c0 fs/open.c:1437
do_sys_open fs/open.c:1452 [inline]
__do_sys_openat fs/open.c:1468 [inline]
__se_sys_openat fs/open.c:1463 [inline]
__x64_sys_openat+0x138/0x170 fs/open.c:1463
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fe3e0ea7407
Code: 48 89 fa 4c 89 df e8 38 aa 00 00 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 1a 5b c3 0f 1f 84 00 00 00 00 00 48 8b 44 24 10 0f 05 <5b> c3 0f 1f 80 00 00 00 00 83 e2 39 83 fa 08 75 de e8 23 ff ff ff
RSP: 002b:00007ffe447dd8f0 EFLAGS: 00000202 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007fe3e1610880 RCX: 00007fe3e0ea7407
RDX: 0000000000080000 RSI: 00007ffe447dda70 RDI: ffffffffffffff9c
RBP: 0000000000000008 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000202 R12: 0000556b9eca17f5
R13: 0000556b9eca17f5 R14: 0000000000000001 R15: 0000556b9ecbc140
</TASK>
task:dhcpcd state:R running task stack:21384 pid:5512 tgid:5512 ppid:5511 task_flags:0x400140 flags:0x00004002
Call Trace:
<TASK>
context_switch kernel/sched/core.c:5397 [inline]
__schedule+0x16fd/0x4cf0 kernel/sched/core.c:6786
preempt_schedule_common+0x83/0xd0 kernel/sched/core.c:6966
preempt_schedule+0xae/0xc0 kernel/sched/core.c:6990
preempt_schedule_thunk+0x16/0x30 arch/x86/entry/thunk.S:12
__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline]
_raw_spin_unlock_irqrestore+0xfd/0x110 kernel/locking/spinlock.c:194
spin_unlock_irqrestore include/linux/spinlock.h:406 [inline]
__wake_up_common_lock+0x190/0x1f0 kernel/sched/wait.c:108
sock_def_readable+0x1fb/0x550 net/core/sock.c:3583
unix_dgram_sendmsg+0xd78/0x17d0 net/unix/af_unix.c:2236
sock_sendmsg_nosec net/socket.c:712 [inline]
__sock_sendmsg+0x21c/0x270 net/socket.c:727
sock_write_iter+0x258/0x330 net/socket.c:1131
do_iter_readv_writev+0x56b/0x7f0 fs/read_write.c:-1
vfs_writev+0x31a/0x960 fs/read_write.c:1057
do_writev+0x14d/0x2d0 fs/read_write.c:1103
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f810cb46407
RSP: 002b:00007ffd0761b7f0 EFLAGS: 00000202 ORIG_RAX: 0000000000000014
RAX: ffffffffffffffda RBX: 00007f810cabc740 RCX: 00007f810cb46407
RDX: 0000000000000002 RSI: 00007ffd0761b890 RDI: 000000000000000b
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000202 R12: 000000000000000b
R13: 00007f810cabc6c8 R14: 0000000000000000 R15: 00007ffd0762b9a0
</TASK>
rcu: rcu_preempt kthread timer wakeup didn't happen for 10501 jiffies! g12441 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x402
rcu: Possible timer handling issue on cpu=0 timer-softirq=4027
rcu: rcu_preempt kthread starved for 10502 jiffies! g12441 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x402 ->cpu=0
rcu: Unless rcu_preempt kthread gets sufficient CPU time, OOM is now expected behavior.
rcu: RCU grace-period kthread stack dump:
task:rcu_preempt state:I stack:27128 pid:16 tgid:16 ppid:2 task_flags:0x208040 flags:0x00004000
Call Trace:
<TASK>
context_switch kernel/sched/core.c:5397 [inline]
__schedule+0x16fd/0x4cf0 kernel/sched/core.c:6786
__schedule_loop kernel/sched/core.c:6864 [inline]
schedule+0x165/0x360 kernel/sched/core.c:6879
schedule_timeout+0x12b/0x270 kernel/time/sleep_timeout.c:99
rcu_gp_fqs_loop+0x301/0x1540 kernel/rcu/tree.c:2054
rcu_gp_kthread+0x99/0x390 kernel/rcu/tree.c:2256
kthread+0x70e/0x8a0 kernel/kthread.c:464
ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
</TASK>
---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup
^ permalink raw reply [flat|nested] 8+ messages in thread* Forwarded: [syz test] net/sched: taprio: reject too-small software schedule intervals 2025-07-28 23:27 [syzbot] [kernfs?] [mm?] INFO: rcu detected stall in kernfs_fop_open (7) syzbot @ 2026-08-11 13:42 ` syzbot 2026-08-31 8:40 ` [syzbot] [kernfs?] [mm?] INFO: rcu detected stall in kernfs_fop_open (7) Junjie Cao 2026-09-01 1:41 ` [syzbot] [kernfs?] [mm?] " Junjie Cao 2 siblings, 0 replies; 8+ messages in thread From: syzbot @ 2026-08-11 13:42 UTC (permalink / raw) To: linux-kernel, syzkaller-bugs For archival purposes, forwarding an incoming command email to linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com. *** Subject: [syz test] net/sched: taprio: reject too-small software schedule intervals Author: junjie.cao@linux.dev #syz test: git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git dd057113ac7ba5bdd2aed3d9405305911152f911 Signed-off-by: Junjie Cao <junjie.cao@intel.com> diff --git a/net/sched/sch_taprio.c b/net/sched/sch_taprio.c index 299234a5f0fe..f740918a3b17 100644 --- a/net/sched/sch_taprio.c +++ b/net/sched/sch_taprio.c @@ -259,6 +259,27 @@ static int length_to_duration(struct taprio_sched *q, int len) return div_u64(len * atomic64_read(&q->picos_per_byte), PSEC_PER_NSEC); } +/* Software schedules service one hrtimer expiry per entry; an interval + * shorter than the expiry servicing cost rearms the timer in the past + * and storms the CPU. 100us stays above that cost across configurations + * (sub-us with lockdep, more under KASAN) and below any practical + * schedule. + */ +#define TAPRIO_MIN_SW_INTERVAL_NS (100 * NSEC_PER_USEC) + +static s64 taprio_min_interval(struct taprio_sched *q) +{ + s64 min_interval = length_to_duration(q, ETH_ZLEN); + + /* Only pure software schedules arm the per-entry hrtimer. */ + if (!FULL_OFFLOAD_IS_ENABLED(q->flags) && + !TXTIME_ASSIST_IS_ENABLED(q->flags)) + min_interval = max_t(s64, min_interval, + TAPRIO_MIN_SW_INTERVAL_NS); + + return min_interval; +} + static int duration_to_length(struct taprio_sched *q, u64 duration) { return div_u64(duration * PSEC_PER_NSEC, atomic64_read(&q->picos_per_byte)); @@ -1038,7 +1059,7 @@ static int fill_sched_entry(struct taprio_sched *q, struct nlattr **tb, struct sched_entry *entry, struct netlink_ext_ack *extack) { - int min_duration = length_to_duration(q, ETH_ZLEN); + s64 min_duration = taprio_min_interval(q); u32 interval = 0; if (tb[TCA_TAPRIO_SCHED_ENTRY_CMD]) @@ -1166,7 +1187,7 @@ static int parse_taprio_schedule(struct taprio_sched *q, struct nlattr **tb, new->cycle_time = cycle; } - if (new->cycle_time < new->num_entries * length_to_duration(q, ETH_ZLEN)) { + if (new->cycle_time < (s64)new->num_entries * taprio_min_interval(q)) { NL_SET_ERR_MSG(extack, "'cycle_time' is too small"); return -EINVAL; } ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [syzbot] [kernfs?] [mm?] INFO: rcu detected stall in kernfs_fop_open (7) 2025-07-28 23:27 [syzbot] [kernfs?] [mm?] INFO: rcu detected stall in kernfs_fop_open (7) syzbot 2026-08-11 13:42 ` Forwarded: [syz test] net/sched: taprio: reject too-small software schedule intervals syzbot @ 2026-08-31 8:40 ` Junjie Cao 2026-08-31 9:20 ` [syzbot] [kernfs?] " syzbot 2026-09-01 1:41 ` [syzbot] [kernfs?] [mm?] " Junjie Cao 2 siblings, 1 reply; 8+ messages in thread From: Junjie Cao @ 2026-08-31 8:40 UTC (permalink / raw) To: syzbot+19d01f6082ec61dd45b2 Cc: gregkh, tj, linux-mm, linux-kernel, syzkaller-bugs, akpm, davem, edumazet, kuba, pabeni, horms, jhs, jiri, vinicius.gomes #syz test: git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git a8455260b2e9c024d1872ac1c094793d55a7e537 diff --git a/net/sched/sch_taprio.c b/net/sched/sch_taprio.c index 39ac5b97aa3a..901dfd2484e1 100644 --- a/net/sched/sch_taprio.c +++ b/net/sched/sch_taprio.c @@ -83,6 +83,10 @@ struct sched_gate_list { s64 cycle_time; s64 cycle_time_extension; s64 base_time; + /* min(cycle_time, sum of intervals): the software schedule restarts + * the list after the last entry even when cycle_time is not up yet. + */ + s64 period; }; struct taprio_sched { @@ -871,12 +875,13 @@ static struct sk_buff *taprio_dequeue(struct Qdisc *sch) } static bool should_restart_cycle(const struct sched_gate_list *oper, - const struct sched_entry *entry) + const struct sched_entry *entry, + ktime_t end_time) { if (list_is_last(&entry->list, &oper->entries)) return true; - if (ktime_compare(entry->end_time, oper->cycle_end_time) == 0) + if (ktime_compare(end_time, oper->cycle_end_time) == 0) return true; return false; @@ -925,8 +930,9 @@ static enum hrtimer_restart advance_sched(struct hrtimer *timer) int num_tc = netdev_get_num_tc(dev); struct sched_entry *entry, *next; struct Qdisc *sch = q->root; - ktime_t end_time; - int tc; + ktime_t end_time, next_start, now; + int budget, tc; + s64 behind; spin_lock(&q->current_entry_lock); entry = rcu_dereference_protected(q->current_entry, @@ -952,23 +958,49 @@ static enum hrtimer_restart advance_sched(struct hrtimer *timer) goto first_run; } - if (should_restart_cycle(oper, entry)) { - next = list_first_entry(&oper->entries, struct sched_entry, - list); - oper->cycle_end_time = ktime_add_ns(oper->cycle_end_time, - oper->cycle_time); - } else { - next = list_next_entry(entry, list); + now = hrtimer_cb_get_time(timer); + end_time = entry->end_time; + behind = ktime_sub(now, end_time); + + /* Behind, e.g. delayed timer or stepped clock: skip whole periods + * arithmetically and walk at most one more to the entry covering + * now, instead of replaying the backlog one expiry at a time. The + * cap bounds the walk; a leftover is picked up by the next expiry. + */ + if (unlikely(behind >= oper->period)) { + s64 jump = div64_s64(behind, oper->period) * oper->period; + + end_time = ktime_add_ns(end_time, jump); + oper->cycle_end_time = ktime_add_ns(oper->cycle_end_time, jump); } - end_time = ktime_add_ns(entry->end_time, next->interval); - end_time = min_t(ktime_t, end_time, oper->cycle_end_time); + budget = 2 * oper->num_entries; + do { + if (should_restart_cycle(oper, entry, end_time)) { + next = list_first_entry(&oper->entries, + struct sched_entry, list); + oper->cycle_end_time = ktime_add_ns(oper->cycle_end_time, + oper->period); + } else { + next = list_next_entry(entry, list); + } + + next_start = end_time; + end_time = ktime_add_ns(next_start, next->interval); + end_time = min_t(ktime_t, end_time, oper->cycle_end_time); + entry = next; + } while (unlikely(ktime_compare(end_time, now) <= 0) && budget--); + /* next can be the entry already published as q->current_entry (a + * single-entry schedule, or a catch-up of whole periods), so the + * close times and budgets below are rewritten in place while + * taprio_dequeue_from_txq() may be reading them. + */ for (tc = 0; tc < num_tc; tc++) { if (next->gate_duration[tc] == oper->cycle_time) next->gate_close_time[tc] = KTIME_MAX; else - next->gate_close_time[tc] = ktime_add_ns(entry->end_time, + next->gate_close_time[tc] = ktime_add_ns(next_start, next->gate_duration[tc]); } @@ -1130,6 +1162,8 @@ static int parse_taprio_schedule(struct taprio_sched *q, struct nlattr **tb, struct sched_gate_list *new, struct netlink_ext_ack *extack) { + struct sched_entry *entry; + ktime_t cycle = 0; int err = 0; if (tb[TCA_TAPRIO_ATTR_SCHED_SINGLE_ENTRY]) { @@ -1152,13 +1186,10 @@ static int parse_taprio_schedule(struct taprio_sched *q, struct nlattr **tb, if (err < 0) return err; - if (!new->cycle_time) { - struct sched_entry *entry; - ktime_t cycle = 0; - - list_for_each_entry(entry, &new->entries, list) - cycle = ktime_add_ns(cycle, entry->interval); + list_for_each_entry(entry, &new->entries, list) + cycle = ktime_add_ns(cycle, entry->interval); + if (!new->cycle_time) { if (cycle < 0 || cycle > INT_MAX) { NL_SET_ERR_MSG(extack, "'cycle_time' is too big"); return -EINVAL; @@ -1172,6 +1203,7 @@ static int parse_taprio_schedule(struct taprio_sched *q, struct nlattr **tb, return -EINVAL; } + new->period = min(new->cycle_time, cycle); taprio_calculate_gate_durations(q, new); return 0; ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [syzbot] [kernfs?] INFO: rcu detected stall in kernfs_fop_open (7) 2026-08-31 8:40 ` [syzbot] [kernfs?] [mm?] INFO: rcu detected stall in kernfs_fop_open (7) Junjie Cao @ 2026-08-31 9:20 ` syzbot 0 siblings, 0 replies; 8+ messages in thread From: syzbot @ 2026-08-31 9:20 UTC (permalink / raw) To: akpm, davem, edumazet, gregkh, horms, jhs, jiri, junjie.cao, kuba, linux-kernel, linux-mm, pabeni, syzkaller-bugs, tj, vinicius.gomes Hello, syzbot tried to test the proposed patch but the build/boot failed: [mem 0x000a0000-0x000bffff window] [ 4.028875][ T1] pci_bus 0000:00: resource 7 [mem 0xc0000000-0xfebfefff window] [ 4.033220][ T1] pci 0000:00:00.0: Limiting direct PCI/PCI transfers [ 4.036737][ T1] PCI: CLS 0 bytes, default 64 [ 4.038432][ T1] PCI-DMA: Using software bounce buffering for IO (SWIOTLB) [ 4.040165][ T1] software IO TLB: mapped [mem 0x00000000b4600000-0x00000000b8600000] (64MB) [ 4.043514][ T1] ACPI: bus type thunderbolt registered [ 4.053039][ T1] RAPL PMU: API unit is 2^-32 Joules, 0 fixed counters, 10737418240 ms ovfl timer [ 4.056245][ T60] kworker/u8:1 (60) used greatest stack depth: 28144 bytes left [ 4.056263][ T61] kworker/u8:1 (61) used greatest stack depth: 27696 bytes left [ 4.087176][ T1] kvm_amd: CPU 1 isn't AMD or Hygon [ 4.088501][ T1] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x1fb7086095e, max_idle_ns: 440795277026 ns [ 4.091902][ T1] clocksource: Switched to clocksource tsc [ 4.125123][ T76] kworker/u8:4 (76) used greatest stack depth: 27232 bytes left [ 4.126234][ T80] kworker/u8:3 (80) used greatest stack depth: 26624 bytes left [ 4.133748][ T1] Initialise system trusted keyrings [ 4.140237][ T1] workingset: timestamp_bits=40 (anon: 35) max_order=21 bucket_order=0 (anon: 0) [ 4.155583][ T1] DLM installed [ 4.162423][ T1] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 4.174374][ T1] NFS: Registering the id_resolver key type [ 4.174518][ T1] Key type id_resolver registered [ 4.174528][ T1] Key type id_legacy registered [ 4.174908][ T1] nfs4filelayout_init: NFSv4 File Layout Driver Registering... [ 4.175092][ T1] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering... [ 4.179203][ T1] smbdirect: subsystem loading... [ 4.191613][ T1] smbdirect: subsystem loaded [ 4.207305][ T1] Key type cifs.spnego registered [ 4.207587][ T1] Key type cifs.idmap registered [ 4.213246][ T1] ntfs3: Enabled Linux POSIX ACLs support [ 4.213275][ T1] ntfs3: Read-only LZX/Xpress compression included [ 4.213730][ T1] jffs2: version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc. [ 4.215917][ T1] romfs: ROMFS MTD (C) 2007 Red Hat, Inc. [ 4.216209][ T1] QNX4 filesystem 0.2.3 registered. [ 4.216310][ T1] qnx6: QNX6 filesystem 1.0.0 registered. [ 4.218163][ T1] fuse: init (API version 7.46) [ 4.224565][ T1] orangefs_debugfs_init: called with debug mask: :none: :0: [ 4.225933][ T1] orangefs_init: module version upstream loaded [ 4.227030][ T1] JFS: nTxBlock = 8192, nTxLock = 65536 [ 4.239841][ T1] SGI XFS with ACLs, security attributes, realtime, quota, no debug enabled [ 4.248736][ T1] 9p: Installing v9fs 9p2000 file system support [ 4.249591][ T1] NILFS version 2 loaded [ 4.249600][ T1] befs: version: 0.9.3 [ 4.251044][ T1] ocfs2: Registered cluster interface o2cb [ 4.253105][ T1] ocfs2: Registered cluster interface user [ 4.263937][ T1] OCFS2 User DLM kernel interface loaded [ 4.302028][ T1] gfs2: GFS2 installed [ 4.325876][ T1] ceph: loaded (mds proto 32) [ 4.350261][ T1] cryptd: max_cpu_qlen set to 1000 [ 4.387051][ T1] NET: Registered PF_ALG protocol family [ 4.387424][ T1] async_tx: api initialized (async) [ 4.387479][ T1] Key type asymmetric registered [ 4.387520][ T1] Asymmetric key parser 'x509' registered [ 4.387530][ T1] Asymmetric key parser 'pkcs8' registered [ 4.387539][ T1] Key type pkcs7_test registered [ 4.389176][ T1] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 239) [ 4.391001][ T1] io scheduler mq-deadline registered [ 4.391015][ T1] io scheduler kyber registered [ 4.391571][ T1] io scheduler bfq registered [ 4.392067][ T1] raid6: skipped pq benchmark and selected avx2x4 [ 4.429845][ T1] input: Power Button as /devices/platform/LNXPWRBN:00/input/input0 [ 4.434169][ T1] ACPI: button: Power Button [PWRF] [ 4.440466][ T1] input: Sleep Button as /devices/platform/LNXSLPBN:00/input/input1 [ 4.443845][ T1] ACPI: button: Sleep Button [SLPF] [ 4.492202][ T1] ioatdma: Intel(R) QuickData Technology Driver 5.00 [ 4.545316][ T1] ACPI: \_SB_.LNKC: Enabled at IRQ 11 [ 4.552843][ T1] virtio-pci 0000:00:03.0: virtio_pci: leaving for legacy driver [ 4.607773][ T1] ACPI: \_SB_.LNKD: Enabled at IRQ 10 [ 4.614492][ T1] virtio-pci 0000:00:04.0: virtio_pci: leaving for legacy driver [ 4.676585][ T1] ACPI: \_SB_.LNKB: Enabled at IRQ 10 [ 4.682990][ T1] virtio-pci 0000:00:06.0: virtio_pci: leaving for legacy driver [ 4.727260][ T1] virtio-pci 0000:00:07.0: virtio_pci: leaving for legacy driver [ 5.558377][ T1] N_HDLC line discipline registered with maxframe=4096 [ 5.559546][ T1] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled [ 5.574119][ T1] 00:02: ttyS0 I/O:0x3f8 (irq = 4, base_baud = 115200) is a 16550A [ 5.605595][ T1] 00:03: ttyS1 I/O:0x2f8 (irq = 3, base_baud = 115200) is a 16550A [ 5.628064][ T1] 00:04: ttyS2 I/O:0x3e8 (irq = 6, base_baud = 115200) is a 16550A [ 5.648098][ T1] 00:05: ttyS3 I/O:0x2e8 (irq = 7, base_baud = 115200) is a 16550A [ 5.688220][ T1] Non-volatile memory driver v1.3 [ 5.733159][ T1] usbcore: registered new interface driver xillyusb [ 5.735138][ T1] ACPI: bus type drm_connector registered [ 5.748474][ T1] [drm] Initialized vgem 1.0.0 for vgem on minor 0 [ 5.756447][ T1] ------------[ cut here ]------------ [ 5.756502][ T1] [PLANE:35:plane-0] pixel format with alpha exposed but blend mode not setup [ 5.756521][ T1] WARNING: drivers/gpu/drm/drm_mode_config.c:873 at drm_mode_config_validate+0x1c6a/0x1e60, CPU#0: swapper/0/1 [ 5.785118][ T1] Modules linked in: [ 5.789695][ T1] CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not tainted syzkaller #0 PREEMPT(full) [ 5.799116][ T1] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026 [ 5.809847][ T1] RIP: 0010:drm_mode_config_validate+0x1cab/0x1e60 [ 5.816628][ T1] Code: 0f 85 ae 00 00 00 4d 8d 77 10 8b 6d 00 4c 89 f0 48 c1 e8 03 80 3c 18 00 74 08 4c 89 f7 e8 dd b2 cc fc 49 8b 16 4c 89 ef 89 ee <67> 48 0f b9 3a eb 05 e8 89 9e 5e fc 49 bd 00 00 00 00 00 fc ff df [ 5.838674][ T1] RSP: 0000:ffffc90000067810 EFLAGS: 00010246 [ 5.845420][ T1] RAX: 1ffff11004c8a408 RBX: dffffc0000000000 RCX: ffff88801ceaddc0 [ 5.854061][ T1] RDX: ffff888026032380 RSI: 0000000000000023 RDI: ffffffff8ff26aa0 [ 5.863036][ T1] RBP: 0000000000000023 R08: ffff8880239ccf6b R09: 1ffff110047399ed [ 5.872017][ T1] R10: dffffc0000000000 R11: ffffed10047399ee R12: dffffc0000000000 [ 5.880270][ T1] R13: ffffffff8ff26aa0 R14: ffff888026452040 R15: ffff888026452030 [ 5.888798][ T1] FS: 0000000000000000(0000) GS:ffff888125704000(0000) knlGS:0000000000000000 [ 5.898155][ T1] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 5.905317][ T1] CR2: ffff88823ffff000 CR3: 000000000e33a000 CR4: 00000000003526f0 [ 5.913991][ T1] Call Trace: [ 5.917285][ T1] <TASK> [ 5.920539][ T1] ? debugfs_create_file_full+0x3f/0x60 [ 5.926297][ T1] drm_dev_register+0x7c/0xd80 [ 5.931608][ T1] vkms_create+0x40d/0x4f0 [ 5.936577][ T1] ? __pfx_vkms_init+0x10/0x10 [ 5.941934][ T1] vkms_init+0x57/0x80 [ 5.946295][ T1] do_one_initcall+0x250/0x870 [ 5.951406][ T1] ? __pfx_vkms_init+0x10/0x10 [ 5.956290][ T1] ? __pfx_do_one_initcall+0x10/0x10 [ 5.962347][ T1] ? lapic_next_event+0x11/0x20 [ 5.967732][ T1] ? clockevents_program_event+0x491/0x630 [ 5.973595][ T1] ? __pfx___schedule+0x10/0x10 [ 5.978930][ T1] ? irqentry_exit+0x218/0x790 [ 5.984090][ T1] ? lockdep_hardirqs_on+0x7b/0x110 [ 5.989508][ T1] ? irqentry_exit+0x218/0x790 [ 5.994552][ T1] ? trace_irq_disable+0x3b/0x140 [ 5.999974][ T1] ? parameq+0x25/0x170 [ 6.004878][ T1] ? parameq+0x14d/0x170 [ 6.009224][ T1] ? parse_args+0x9c3/0xad0 [ 6.014154][ T1] ? rcu_is_watching+0x16/0xb0 [ 6.019426][ T1] do_initcall_level+0x10a/0x1a0 [ 6.024854][ T1] ? kernel_init+0x22/0x1d0 [ 6.029487][ T1] do_initcalls+0x59/0xa0 [ 6.034077][ T1] kernel_init_freeable+0x29d/0x3e0 [ 6.039941][ T1] ? __pfx_kernel_init+0x10/0x10 [ 6.045132][ T1] kernel_init+0x22/0x1d0 [ 6.049797][ T1] ? __pfx_kernel_init+0x10/0x10 [ 6.055569][ T1] ret_from_fork+0x514/0xb70 [ 6.060573][ T1] ? __pfx_ret_from_fork+0x10/0x10 [ 6.066057][ T1] ? __switch_to+0xc89/0x1420 [ 6.071718][ T1] ? __pfx_kernel_init+0x10/0x10 [ 6.077617][ T1] ret_from_fork_asm+0x1a/0x30 [ 6.082852][ T1] </TASK> [ 6.086082][ T1] Kernel panic - not syncing: kernel: panic_on_warn set ... [ 6.092792][ T1] CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not tainted syzkaller #0 PREEMPT(full) [ 6.092792][ T1] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/24/2026 [ 6.092792][ T1] Call Trace: [ 6.092792][ T1] <TASK> [ 6.092792][ T1] vpanic+0x56d/0xa60 [ 6.092792][ T1] ? __pfx__printk+0x10/0x10 [ 6.092792][ T1] ? __pfx_vpanic+0x10/0x10 [ 6.092792][ T1] ? is_bpf_text_address+0x292/0x2b0 [ 6.092792][ T1] ? is_bpf_text_address+0x26/0x2b0 [ 6.140129][ T1] panic+0xc5/0xd0 [ 6.140129][ T1] ? __pfx_panic+0x10/0x10 [ 6.140129][ T1] ? ret_from_fork_asm+0x1a/0x30 [ 6.140129][ T1] __warn+0x315/0x4c0 [ 6.140129][ T1] ? drm_mode_config_validate+0x1c6a/0x1e60 [ 6.140129][ T1] ? drm_mode_config_validate+0x1c6a/0x1e60 [ 6.140129][ T1] __report_bug+0x276/0x570 [ 6.140129][ T1] ? look_up_lock_class+0x57/0x110 [ 6.140129][ T1] ? drm_mode_config_validate+0x1c6a/0x1e60 [ 6.140129][ T1] ? __pfx___report_bug+0x10/0x10 [ 6.140129][ T1] ? __pfx_inode_set_ctime_to_ts+0x10/0x10 [ 6.140129][ T1] ? seqcount_lockdep_reader_access+0xeb/0x100 [ 6.140129][ T1] ? ktime_get_coarse_real_ts64_mg+0x1be/0x1e0 [ 6.140129][ T1] report_bug_entry+0x19b/0x290 [ 6.140129][ T1] ? drm_mode_config_validate+0x1cab/0x1e60 [ 6.140129][ T1] ? drm_mode_config_validate+0x1cb0/0x1e60 [ 6.140129][ T1] handle_bug+0xce/0x200 [ 6.140129][ T1] exc_invalid_op+0x1a/0x50 [ 6.240148][ T1] asm_exc_invalid_op+0x1a/0x20 [ 6.240148][ T1] RIP: 0010:drm_mode_config_validate+0x1cab/0x1e60 [ 6.240148][ T1] Code: 0f 85 ae 00 00 00 4d 8d 77 10 8b 6d 00 4c 89 f0 48 c1 e8 03 80 3c 18 00 74 08 4c 89 f7 e8 dd b2 cc fc 49 8b 16 4c 89 ef 89 ee <67> 48 0f b9 3a eb 05 e8 89 9e 5e fc 49 bd 00 00 00 00 00 fc ff df [ 6.240148][ T1] RSP: 0000:ffffc90000067810 EFLAGS: 00010246 [ 6.240148][ T1] RAX: 1ffff11004c8a408 RBX: dffffc0000000000 RCX: ffff88801ceaddc0 [ 6.240148][ T1] RDX: ffff888026032380 RSI: 0000000000000023 RDI: ffffffff8ff26aa0 [ 6.240148][ T1] RBP: 0000000000000023 R08: ffff8880239ccf6b R09: 1ffff110047399ed [ 6.240148][ T1] R10: dffffc0000000000 R11: ffffed10047399ee R12: dffffc0000000000 [ 6.240148][ T1] R13: ffffffff8ff26aa0 R14: ffff888026452040 R15: ffff888026452030 [ 6.240148][ T1] ? debugfs_create_file_full+0x3f/0x60 [ 6.240148][ T1] drm_dev_register+0x7c/0xd80 [ 6.240148][ T1] vkms_create+0x40d/0x4f0 [ 6.340134][ T1] ? __pfx_vkms_init+0x10/0x10 [ 6.340134][ T1] vkms_init+0x57/0x80 [ 6.340134][ T1] do_one_initcall+0x250/0x870 [ 6.340134][ T1] ? __pfx_vkms_init+0x10/0x10 [ 6.340134][ T1] ? __pfx_do_one_initcall+0x10/0x10 [ 6.340134][ T1] ? lapic_next_event+0x11/0x20 [ 6.340134][ T1] ? clockevents_program_event+0x491/0x630 [ 6.340134][ T1] ? __pfx___schedule+0x10/0x10 [ 6.340134][ T1] ? irqentry_exit+0x218/0x790 [ 6.340134][ T1] ? lockdep_hardirqs_on+0x7b/0x110 [ 6.340134][ T1] ? irqentry_exit+0x218/0x790 [ 6.340134][ T1] ? trace_irq_disable+0x3b/0x140 [ 6.340134][ T1] ? parameq+0x25/0x170 [ 6.340134][ T1] ? parameq+0x14d/0x170 [ 6.340134][ T1] ? parse_args+0x9c3/0xad0 [ 6.340134][ T1] ? rcu_is_watching+0x16/0xb0 [ 6.340134][ T1] do_initcall_level+0x10a/0x1a0 [ 6.440160][ T1] ? kernel_init+0x22/0x1d0 [ 6.440160][ T1] do_initcalls+0x59/0xa0 [ 6.440160][ T1] kernel_init_freeable+0x29d/0x3e0 [ 6.440160][ T1] ? __pfx_kernel_init+0x10/0x10 [ 6.440160][ T1] kernel_init+0x22/0x1d0 [ 6.440160][ T1] ? __pfx_kernel_init+0x10/0x10 [ 6.440160][ T1] ret_from_fork+0x514/0xb70 [ 6.440160][ T1] ? __pfx_ret_from_fork+0x10/0x10 [ 6.440160][ T1] ? __switch_to+0xc89/0x1420 [ 6.440160][ T1] ? __pfx_kernel_init+0x10/0x10 [ 6.440160][ T1] ret_from_fork_asm+0x1a/0x30 [ 6.440160][ T1] </TASK> [ 6.440160][ T1] Kernel Offset: disabled [ 6.440160][ T1] Rebooting in 86400 seconds.. syzkaller build log: go env (err=<nil>) AR='ar' CC='gcc' CGO_CFLAGS='-O2 -g' CGO_CPPFLAGS='' CGO_CXXFLAGS='-O2 -g' CGO_ENABLED='1' CGO_FFLAGS='-O2 -g' CGO_LDFLAGS='-O2 -g' CXX='g++' GCCGO='gccgo' GO111MODULE='auto' GOAMD64='v1' GOARCH='amd64' GOAUTH='netrc' GOBIN='' GOCACHE='/syzkaller/.cache/go-build' GOCACHEPROG='' GODEBUG='' GOENV='/syzkaller/.config/go/env' GOEXE='' GOEXPERIMENT='' GOFIPS140='off' GOFLAGS='' GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build106592319=/tmp/go-build -gno-record-gcc-switches' GOHOSTARCH='amd64' GOHOSTOS='linux' GOINSECURE='' GOMOD='/syzkaller/jobs-2/linux/gopath/src/github.com/google/syzkaller/go.mod' GOMODCACHE='/syzkaller/jobs-2/linux/gopath/pkg/mod' GONOPROXY='' GONOSUMDB='' GOOS='linux' GOPATH='/syzkaller/jobs-2/linux/gopath' GOPRIVATE='' GOPROXY='https://proxy.golang.org,direct' GOROOT='/usr/local/go' GOSUMDB='sum.golang.org' GOTELEMETRY='local' GOTELEMETRYDIR='/syzkaller/.config/go/telemetry' GOTMPDIR='' GOTOOLCHAIN='auto' GOTOOLDIR='/usr/local/go/pkg/tool/linux_amd64' GOVCS='' GOVERSION='go1.26.0' GOWORK='' PKG_CONFIG='pkg-config' git status (err=<nil>) HEAD detached at fb8f743dc82 nothing to commit, working tree clean tput: No value for $TERM and no -T specified tput: No value for $TERM and no -T specified Makefile:31: run command via tools/syz-env for best compatibility, see: Makefile:32: https://github.com/google/syzkaller/blob/master/docs/contributing.md#using-syz-env go list -f '{{.Stale}}' ./sys/syz-sysgen | grep -q false || go install ./sys/syz-sysgen make .descriptions tput: No value for $TERM and no -T specified tput: No value for $TERM and no -T specified Makefile:31: run command via tools/syz-env for best compatibility, see: Makefile:32: https://github.com/google/syzkaller/blob/master/docs/contributing.md#using-syz-env bin/syz-sysgen touch .descriptions GOOS=linux GOARCH=amd64 go build -ldflags="-s -w -X github.com/google/syzkaller/prog.GitRevision=fb8f743dc82ba3a879228aa71ce09fdc570665d1 -X github.com/google/syzkaller/prog.gitRevisionDate=20250724-140804" -o ./bin/linux_amd64/syz-execprog github.com/google/syzkaller/tools/syz-execprog mkdir -p ./bin/linux_amd64 g++ -o ./bin/linux_amd64/syz-executor executor/executor.cc \ -m64 -O2 -pthread -Wall -Werror -Wparentheses -Wunused-const-variable -Wframe-larger-than=16384 -Wno-stringop-overflow -Wno-array-bounds -Wno-format-overflow -Wno-unused-but-set-variable -Wno-unused-command-line-argument -static-pie -std=c++17 -I. -Iexecutor/_include -DGOOS_linux=1 -DGOARCH_amd64=1 \ -DHOSTGOOS_linux=1 -DGIT_REVISION=\"fb8f743dc82ba3a879228aa71ce09fdc570665d1\" /usr/bin/ld: /tmp/ccAow3F6.o: in function `Connection::Connect(char const*, char const*)': executor.cc:(.text._ZN10Connection7ConnectEPKcS1_[_ZN10Connection7ConnectEPKcS1_]+0x386): warning: Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking Error text is too large and was truncated, full error text is at: https://syzkaller.appspot.com/x/error.txt?x=16824349580000 Tested on: commit: a8455260 ipvlan: unregister upper devices outside pnod.. git tree: git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git kernel config: https://syzkaller.appspot.com/x/.config?x=d7588e5a39260ad2 dashboard link: https://syzkaller.appspot.com/bug?extid=19d01f6082ec61dd45b2 compiler: Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8 patch: https://syzkaller.appspot.com/x/patch.diff?x=170c4349580000 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [syzbot] [kernfs?] [mm?] INFO: rcu detected stall in kernfs_fop_open (7) 2025-07-28 23:27 [syzbot] [kernfs?] [mm?] INFO: rcu detected stall in kernfs_fop_open (7) syzbot 2026-08-11 13:42 ` Forwarded: [syz test] net/sched: taprio: reject too-small software schedule intervals syzbot 2026-08-31 8:40 ` [syzbot] [kernfs?] [mm?] INFO: rcu detected stall in kernfs_fop_open (7) Junjie Cao @ 2026-09-01 1:41 ` Junjie Cao 2026-09-01 7:45 ` [syzbot] [kernfs?] " syzbot 2 siblings, 1 reply; 8+ messages in thread From: Junjie Cao @ 2026-09-01 1:41 UTC (permalink / raw) To: syzbot+19d01f6082ec61dd45b2 Cc: gregkh, tj, linux-mm, linux-kernel, syzkaller-bugs, akpm, davem, edumazet, kuba, pabeni, horms, jhs, jiri, vinicius.gomes #syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git abdf623ddb75b24659018d3952d8f61937306ae5 diff --git a/net/sched/sch_taprio.c b/net/sched/sch_taprio.c index 39ac5b97aa3a..901dfd2484e1 100644 --- a/net/sched/sch_taprio.c +++ b/net/sched/sch_taprio.c @@ -83,6 +83,10 @@ struct sched_gate_list { s64 cycle_time; s64 cycle_time_extension; s64 base_time; + /* min(cycle_time, sum of intervals): the software schedule restarts + * the list after the last entry even when cycle_time is not up yet. + */ + s64 period; }; struct taprio_sched { @@ -871,12 +875,13 @@ static struct sk_buff *taprio_dequeue(struct Qdisc *sch) } static bool should_restart_cycle(const struct sched_gate_list *oper, - const struct sched_entry *entry) + const struct sched_entry *entry, + ktime_t end_time) { if (list_is_last(&entry->list, &oper->entries)) return true; - if (ktime_compare(entry->end_time, oper->cycle_end_time) == 0) + if (ktime_compare(end_time, oper->cycle_end_time) == 0) return true; return false; @@ -925,8 +930,9 @@ static enum hrtimer_restart advance_sched(struct hrtimer *timer) int num_tc = netdev_get_num_tc(dev); struct sched_entry *entry, *next; struct Qdisc *sch = q->root; - ktime_t end_time; - int tc; + ktime_t end_time, next_start, now; + int budget, tc; + s64 behind; spin_lock(&q->current_entry_lock); entry = rcu_dereference_protected(q->current_entry, @@ -952,23 +958,49 @@ static enum hrtimer_restart advance_sched(struct hrtimer *timer) goto first_run; } - if (should_restart_cycle(oper, entry)) { - next = list_first_entry(&oper->entries, struct sched_entry, - list); - oper->cycle_end_time = ktime_add_ns(oper->cycle_end_time, - oper->cycle_time); - } else { - next = list_next_entry(entry, list); + now = hrtimer_cb_get_time(timer); + end_time = entry->end_time; + behind = ktime_sub(now, end_time); + + /* Behind, e.g. delayed timer or stepped clock: skip whole periods + * arithmetically and walk at most one more to the entry covering + * now, instead of replaying the backlog one expiry at a time. The + * cap bounds the walk; a leftover is picked up by the next expiry. + */ + if (unlikely(behind >= oper->period)) { + s64 jump = div64_s64(behind, oper->period) * oper->period; + + end_time = ktime_add_ns(end_time, jump); + oper->cycle_end_time = ktime_add_ns(oper->cycle_end_time, jump); } - end_time = ktime_add_ns(entry->end_time, next->interval); - end_time = min_t(ktime_t, end_time, oper->cycle_end_time); + budget = 2 * oper->num_entries; + do { + if (should_restart_cycle(oper, entry, end_time)) { + next = list_first_entry(&oper->entries, + struct sched_entry, list); + oper->cycle_end_time = ktime_add_ns(oper->cycle_end_time, + oper->period); + } else { + next = list_next_entry(entry, list); + } + + next_start = end_time; + end_time = ktime_add_ns(next_start, next->interval); + end_time = min_t(ktime_t, end_time, oper->cycle_end_time); + entry = next; + } while (unlikely(ktime_compare(end_time, now) <= 0) && budget--); + /* next can be the entry already published as q->current_entry (a + * single-entry schedule, or a catch-up of whole periods), so the + * close times and budgets below are rewritten in place while + * taprio_dequeue_from_txq() may be reading them. + */ for (tc = 0; tc < num_tc; tc++) { if (next->gate_duration[tc] == oper->cycle_time) next->gate_close_time[tc] = KTIME_MAX; else - next->gate_close_time[tc] = ktime_add_ns(entry->end_time, + next->gate_close_time[tc] = ktime_add_ns(next_start, next->gate_duration[tc]); } @@ -1130,6 +1162,8 @@ static int parse_taprio_schedule(struct taprio_sched *q, struct nlattr **tb, struct sched_gate_list *new, struct netlink_ext_ack *extack) { + struct sched_entry *entry; + ktime_t cycle = 0; int err = 0; if (tb[TCA_TAPRIO_ATTR_SCHED_SINGLE_ENTRY]) { @@ -1152,13 +1186,10 @@ static int parse_taprio_schedule(struct taprio_sched *q, struct nlattr **tb, if (err < 0) return err; - if (!new->cycle_time) { - struct sched_entry *entry; - ktime_t cycle = 0; - - list_for_each_entry(entry, &new->entries, list) - cycle = ktime_add_ns(cycle, entry->interval); + list_for_each_entry(entry, &new->entries, list) + cycle = ktime_add_ns(cycle, entry->interval); + if (!new->cycle_time) { if (cycle < 0 || cycle > INT_MAX) { NL_SET_ERR_MSG(extack, "'cycle_time' is too big"); return -EINVAL; @@ -1172,6 +1203,7 @@ static int parse_taprio_schedule(struct taprio_sched *q, struct nlattr **tb, return -EINVAL; } + new->period = min(new->cycle_time, cycle); taprio_calculate_gate_durations(q, new); return 0; ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [syzbot] [kernfs?] INFO: rcu detected stall in kernfs_fop_open (7) 2026-09-01 1:41 ` [syzbot] [kernfs?] [mm?] " Junjie Cao @ 2026-09-01 7:45 ` syzbot 0 siblings, 0 replies; 8+ messages in thread From: syzbot @ 2026-09-01 7:45 UTC (permalink / raw) To: akpm, davem, edumazet, gregkh, horms, jhs, jiri, junjie.cao, kuba, linux-kernel, linux-mm, pabeni, syzkaller-bugs, tj, vinicius.gomes Hello, syzbot has tested the proposed patch and the reproducer did not trigger any issue: Reported-by: syzbot+19d01f6082ec61dd45b2@syzkaller.appspotmail.com Tested-by: syzbot+19d01f6082ec61dd45b2@syzkaller.appspotmail.com Tested on: commit: abdf623d Merge tag 'wq-for-7.3-rc1-fixes' of git://git.. git tree: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git console output: https://syzkaller.appspot.com/x/log.txt?x=12f51379580000 kernel config: https://syzkaller.appspot.com/x/.config?x=d7588e5a39260ad2 dashboard link: https://syzkaller.appspot.com/bug?extid=19d01f6082ec61dd45b2 compiler: Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8 patch: https://syzkaller.appspot.com/x/patch.diff?x=14a46d9e580000 Note: testing is done by a robot and is best-effort only. ^ permalink raw reply [flat|nested] 8+ messages in thread
* [syzbot] [mm?] INFO: rcu detected stall in sys_munmap (2) @ 2025-08-22 4:15 syzbot 2026-08-11 13:11 ` Forwarded: [syz test] net/sched: taprio: reject too-small software schedule intervals syzbot 0 siblings, 1 reply; 8+ messages in thread From: syzbot @ 2025-08-22 4:15 UTC (permalink / raw) To: Liam.Howlett, akpm, jannh, linux-kernel, linux-mm, lorenzo.stoakes, pfalcato, syzkaller-bugs, vbabka Hello, syzbot found the following issue on: HEAD commit: be48bcf004f9 Merge tag 'for-6.17-rc2-tag' of git://git.ker.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=136dfba2580000 kernel config: https://syzkaller.appspot.com/x/.config?x=142508fb116c212f dashboard link: https://syzkaller.appspot.com/bug?extid=8785aaf121cfb2141e0d compiler: gcc (Debian 12.2.0-14+deb12u1) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40 syz repro: https://syzkaller.appspot.com/x/repro.syz?x=107a43bc580000 Downloadable assets: disk image: https://storage.googleapis.com/syzbot-assets/24fd400c6842/disk-be48bcf0.raw.xz vmlinux: https://storage.googleapis.com/syzbot-assets/59146305635d/vmlinux-be48bcf0.xz kernel image: https://storage.googleapis.com/syzbot-assets/b3e5f65cbcc8/bzImage-be48bcf0.xz IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: syzbot+8785aaf121cfb2141e0d@syzkaller.appspotmail.com rcu: INFO: rcu_preempt detected stalls on CPUs/tasks: rcu: Tasks blocked on level-0 rcu_node (CPUs 0-1): P6029/1:b..l P1208/1:b..l P6031/3:b..l P6030/1:b..l rcu: (detected by 1, t=10502 jiffies, g=6285, q=421 ncpus=2) task:dhcpcd state:R running task stack:28896 pid:6030 tgid:6030 ppid:5513 task_flags:0x400040 flags:0x00004002 Call Trace: <TASK> context_switch kernel/sched/core.c:5357 [inline] __schedule+0x1190/0x5de0 kernel/sched/core.c:6961 preempt_schedule_irq+0x51/0x90 kernel/sched/core.c:7288 irqentry_exit+0x36/0x90 kernel/entry/common.c:197 asm_sysvec_reschedule_ipi+0x1a/0x20 arch/x86/include/asm/idtentry.h:707 RIP: 0010:unwind_next_frame+0xfe7/0x20a0 arch/x86/kernel/unwind_orc.c:664 Code: 85 80 0c 00 00 49 89 6d 40 48 b8 00 00 00 00 00 fc ff df 4c 89 ea 48 c1 ea 03 0f b6 04 02 84 c0 74 08 3c 03 0f 8e 56 10 00 00 <41> 39 5d 00 0f 84 10 06 00 00 bd 01 00 00 00 e9 de f3 ff ff 48 b8 RSP: 0018:ffffc90003cdf6a8 EFLAGS: 00000246 RAX: 0000000000000000 RBX: 0000000000000001 RCX: ffffc90003ce0000 RDX: 1ffff9200079bee3 RSI: ffffc90003cdfa70 RDI: ffffc90003cdf758 RBP: ffffc90003cdfae0 R08: 0000000000000001 R09: 0000000000000000 R10: ffffc90003cdf718 R11: 00000000000121e6 R12: ffffc90003cdf768 R13: ffffc90003cdf718 R14: ffffc90003cdfa80 R15: ffffc90003cdf74c arch_stack_walk+0x94/0x100 arch/x86/kernel/stacktrace.c:25 stack_trace_save+0x8e/0xc0 kernel/stacktrace.c:122 kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_record_aux_stack+0xa7/0xc0 mm/kasan/generic.c:548 slab_free_hook mm/slub.c:2378 [inline] slab_free mm/slub.c:4680 [inline] kmem_cache_free+0x15a/0x4d0 mm/slub.c:4782 vms_complete_munmap_vmas+0x573/0x970 mm/vma.c:1293 do_vmi_align_munmap+0x43b/0x7d0 mm/vma.c:1536 do_vmi_munmap+0x204/0x3e0 mm/vma.c:1584 __vm_munmap+0x19a/0x390 mm/vma.c:3155 __do_sys_munmap mm/mmap.c:1080 [inline] __se_sys_munmap mm/mmap.c:1077 [inline] __x64_sys_munmap+0x59/0x80 mm/mmap.c:1077 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fb13ec2f2e7 RSP: 002b:00007fffe10fae78 EFLAGS: 00000206 ORIG_RAX: 000000000000000b RAX: ffffffffffffffda RBX: 0000562bd1443510 RCX: 00007fb13ec2f2e7 RDX: 0000000000000002 RSI: 0000000000004028 RDI: 00007fb13ea1b000 RBP: 00007fffe10faf80 R08: 0000562bd1432470 R09: 0000000000000001 R10: 00007fffe10fadb0 R11: 0000000000000206 R12: 00007fffe10faea0 R13: 00007fb13ec42000 R14: 0000562bd1443510 R15: 0000000000000000 </TASK> task:syz-executor state:R running task stack:27632 pid:6031 tgid:6031 ppid:5870 task_flags:0x400000 flags:0x00004000 Call Trace: <TASK> context_switch kernel/sched/core.c:5357 [inline] __schedule+0x1190/0x5de0 kernel/sched/core.c:6961 preempt_schedule_common+0x44/0xc0 kernel/sched/core.c:7145 preempt_schedule_thunk+0x16/0x30 arch/x86/entry/thunk.S:12 __raw_spin_unlock include/linux/spinlock_api_smp.h:143 [inline] _raw_spin_unlock+0x3e/0x50 kernel/locking/spinlock.c:186 spin_unlock include/linux/spinlock.h:391 [inline] filemap_map_pages+0xe15/0x1670 mm/filemap.c:3791 do_fault_around mm/memory.c:5531 [inline] do_read_fault mm/memory.c:5564 [inline] do_fault mm/memory.c:5707 [inline] do_pte_missing+0xe39/0x3ba0 mm/memory.c:4234 handle_pte_fault mm/memory.c:6052 [inline] __handle_mm_fault+0x152a/0x2a50 mm/memory.c:6195 handle_mm_fault+0x589/0xd10 mm/memory.c:6364 do_user_addr_fault+0x60c/0x1370 arch/x86/mm/fault.c:1336 handle_page_fault arch/x86/mm/fault.c:1476 [inline] exc_page_fault+0x5c/0xb0 arch/x86/mm/fault.c:1532 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 RIP: 0033:0x7f54cd7177c7 RSP: 002b:00007fffb79a5b40 EFLAGS: 00010246 RAX: 00007f54ce525000 RBX: 0000000000000000 RCX: 0000000000000064 RDX: 00007fffb79a5de9 RSI: 0000000000000002 RDI: 00007fffb79a5dd8 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000002 R13: 00007fffb79a5c48 R14: 0000000000000000 R15: 0000000000000000 </TASK> task:kworker/0:3 state:R running task stack:25368 pid:1208 tgid:1208 ppid:2 task_flags:0x4208060 flags:0x00004000 Workqueue: events_power_efficient gc_worker Call Trace: <TASK> context_switch kernel/sched/core.c:5357 [inline] __schedule+0x1190/0x5de0 kernel/sched/core.c:6961 preempt_schedule_irq+0x51/0x90 kernel/sched/core.c:7288 irqentry_exit+0x36/0x90 kernel/entry/common.c:197 asm_sysvec_reschedule_ipi+0x1a/0x20 arch/x86/include/asm/idtentry.h:707 RIP: 0010:write_comp_data+0x0/0x90 kernel/kcov.c:240 Code: 48 8b 05 db b4 1a 12 48 8b 80 30 16 00 00 e9 97 05 db 09 0f 1f 80 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 <49> 89 d2 49 89 f8 49 89 f1 65 48 8b 15 a7 b4 1a 12 65 8b 05 b8 b4 RSP: 0018:ffffc9000441fb50 EFLAGS: 00000293 RAX: 0000000000000000 RBX: 0000000000040000 RCX: ffffffff89ba2a52 RDX: 0000000000040000 RSI: 0000000000000433 RDI: 0000000000000004 RBP: ffffffff9b2c41ec R08: 0000000000000004 R09: 0000000000000000 R10: 0000000000000000 R11: ffffffff9b030610 R12: ffff888031800000 R13: 0000000000000433 R14: dffffc0000000000 R15: 0000000000001770 gc_worker+0x342/0x16e0 net/netfilter/nf_conntrack_core.c:1549 process_one_work+0x9cc/0x1b70 kernel/workqueue.c:3236 process_scheduled_works kernel/workqueue.c:3319 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3400 kthread+0x3c5/0x780 kernel/kthread.c:463 ret_from_fork+0x5d7/0x6f0 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 </TASK> task:dhcpcd state:R running task stack:26072 pid:6029 tgid:6029 ppid:5513 task_flags:0x400040 flags:0x00004002 Call Trace: <TASK> context_switch kernel/sched/core.c:5357 [inline] __schedule+0x1190/0x5de0 kernel/sched/core.c:6961 preempt_schedule_irq+0x51/0x90 kernel/sched/core.c:7288 irqentry_exit+0x36/0x90 kernel/entry/common.c:197 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:orc_ip arch/x86/kernel/unwind_orc.c:80 [inline] RIP: 0010:__orc_find+0x7e/0xf0 arch/x86/kernel/unwind_orc.c:102 Code: ea 3f 48 c1 fe 02 48 01 f2 48 d1 fa 48 8d 5c 95 00 48 89 da 48 c1 ea 03 0f b6 34 0a 48 89 da 83 e2 07 83 c2 03 40 38 f2 7c 05 <40> 84 f6 75 4b 48 63 13 48 01 da 49 39 d5 73 af 4c 8d 63 fc 49 39 RSP: 0018:ffffc90003337648 EFLAGS: 00000202 RAX: ffffffff914e0dd8 RBX: ffffffff90c5215c RCX: dffffc0000000000 RDX: 0000000000000007 RSI: 0000000000000000 RDI: ffffffff90c52148 RBP: ffffffff90c52148 R08: ffffffff914e0e1a R09: 0000000000000000 R10: ffffc900033376f8 R11: 0000000000011271 R12: ffffffff90c52170 R13: ffffffff82127173 R14: ffffffff90c52148 R15: ffffffff90c52148 orc_find arch/x86/kernel/unwind_orc.c:227 [inline] unwind_next_frame+0x2ec/0x20a0 arch/x86/kernel/unwind_orc.c:494 arch_stack_walk+0x94/0x100 arch/x86/kernel/stacktrace.c:25 stack_trace_save+0x8e/0xc0 kernel/stacktrace.c:122 kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:388 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:405 kmalloc_noprof include/linux/slab.h:905 [inline] slab_free_hook mm/slub.c:2369 [inline] slab_free mm/slub.c:4680 [inline] kmem_cache_free+0x142/0x4d0 mm/slub.c:4782 vms_complete_munmap_vmas+0x573/0x970 mm/vma.c:1293 do_vmi_align_munmap+0x43b/0x7d0 mm/vma.c:1536 do_vmi_munmap+0x204/0x3e0 mm/vma.c:1584 __vm_munmap+0x19a/0x390 mm/vma.c:3155 __do_sys_munmap mm/mmap.c:1080 [inline] __se_sys_munmap mm/mmap.c:1077 [inline] __x64_sys_munmap+0x59/0x80 mm/mmap.c:1077 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fb13ec2f2e7 RSP: 002b:00007fffe10fae78 EFLAGS: 00000202 ORIG_RAX: 000000000000000b RAX: ffffffffffffffda RBX: 0000562bd1443f00 RCX: 00007fb13ec2f2e7 RDX: 0000000000000001 RSI: 000000000002f6d0 RDI: 00007fb13e9c1000 RBP: 00007fffe10faf80 R08: 00000000000004f0 R09: 0000000000000002 R10: 00007fffe10fadb0 R11: 0000000000000202 R12: 00007fffe10faec0 R13: 00007fb13ec42000 R14: 0000562bd1443f00 R15: 0000000000000000 </TASK> --- This report is generated by a bot. It may contain errors. See https://goo.gl/tpsmEJ for more information about syzbot. syzbot engineers can be reached at syzkaller@googlegroups.com. syzbot will keep track of this issue. See: https://goo.gl/tpsmEJ#status for how to communicate with syzbot. If the report is already addressed, let syzbot know by replying with: #syz fix: exact-commit-title If you want syzbot to run the reproducer, reply with: #syz test: git://repo/address.git branch-or-commit-hash If you attach or paste a git patch, syzbot will apply it before testing. If you want to overwrite report's subsystems, reply with: #syz set subsystems: new-subsystem (See the list of subsystem names on the web dashboard) If the report is a duplicate of another one, reply with: #syz dup: exact-subject-of-another-report If you want to undo deduplication, reply with: #syz undup ^ permalink raw reply [flat|nested] 8+ messages in thread
* Forwarded: [syz test] net/sched: taprio: reject too-small software schedule intervals 2025-08-22 4:15 [syzbot] [mm?] INFO: rcu detected stall in sys_munmap (2) syzbot @ 2026-08-11 13:11 ` syzbot 0 siblings, 0 replies; 8+ messages in thread From: syzbot @ 2026-08-11 13:11 UTC (permalink / raw) To: linux-kernel, syzkaller-bugs For archival purposes, forwarding an incoming command email to linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com. *** Subject: [syz test] net/sched: taprio: reject too-small software schedule intervals Author: junjie.cao@linux.dev #syz test: git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git dd057113ac7ba5bdd2aed3d9405305911152f911 Signed-off-by: Junjie Cao <junjie.cao@intel.com> diff --git a/net/sched/sch_taprio.c b/net/sched/sch_taprio.c index 299234a5f0fe..f740918a3b17 100644 --- a/net/sched/sch_taprio.c +++ b/net/sched/sch_taprio.c @@ -259,6 +259,27 @@ static int length_to_duration(struct taprio_sched *q, int len) return div_u64(len * atomic64_read(&q->picos_per_byte), PSEC_PER_NSEC); } +/* Software schedules service one hrtimer expiry per entry; an interval + * shorter than the expiry servicing cost rearms the timer in the past + * and storms the CPU. 100us stays above that cost across configurations + * (sub-us with lockdep, more under KASAN) and below any practical + * schedule. + */ +#define TAPRIO_MIN_SW_INTERVAL_NS (100 * NSEC_PER_USEC) + +static s64 taprio_min_interval(struct taprio_sched *q) +{ + s64 min_interval = length_to_duration(q, ETH_ZLEN); + + /* Only pure software schedules arm the per-entry hrtimer. */ + if (!FULL_OFFLOAD_IS_ENABLED(q->flags) && + !TXTIME_ASSIST_IS_ENABLED(q->flags)) + min_interval = max_t(s64, min_interval, + TAPRIO_MIN_SW_INTERVAL_NS); + + return min_interval; +} + static int duration_to_length(struct taprio_sched *q, u64 duration) { return div_u64(duration * PSEC_PER_NSEC, atomic64_read(&q->picos_per_byte)); @@ -1038,7 +1059,7 @@ static int fill_sched_entry(struct taprio_sched *q, struct nlattr **tb, struct sched_entry *entry, struct netlink_ext_ack *extack) { - int min_duration = length_to_duration(q, ETH_ZLEN); + s64 min_duration = taprio_min_interval(q); u32 interval = 0; if (tb[TCA_TAPRIO_SCHED_ENTRY_CMD]) @@ -1166,7 +1187,7 @@ static int parse_taprio_schedule(struct taprio_sched *q, struct nlattr **tb, new->cycle_time = cycle; } - if (new->cycle_time < new->num_entries * length_to_duration(q, ETH_ZLEN)) { + if (new->cycle_time < (s64)new->num_entries * taprio_min_interval(q)) { NL_SET_ERR_MSG(extack, "'cycle_time' is too small"); return -EINVAL; } ^ permalink raw reply [flat|nested] 8+ messages in thread
* [syzbot] [bridge?] INFO: rcu detected stall in br_handle_frame (6) @ 2026-01-13 18:06 syzbot 2026-08-11 13:43 ` Forwarded: [syz test] net/sched: taprio: reject too-small software schedule intervals syzbot 0 siblings, 1 reply; 8+ messages in thread From: syzbot @ 2026-01-13 18:06 UTC (permalink / raw) To: bridge, coreteam, davem, edumazet, fw, horms, idosch, kadlec, kuba, linux-kernel, netdev, netfilter-devel, pabeni, pablo, phil, razor, syzkaller-bugs Hello, syzbot found the following issue on: HEAD commit: f83a4f2a4d8c Merge tag 'erofs-for-6.17-rc6-fixes' of git:/.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=17d98762580000 kernel config: https://syzkaller.appspot.com/x/.config?x=4d8792ecb6308d0f dashboard link: https://syzkaller.appspot.com/bug?extid=f8850bc3986562f79619 compiler: Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8 syz repro: https://syzkaller.appspot.com/x/repro.syz?x=102d3b62580000 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=174fb934580000 Downloadable assets: disk image: https://storage.googleapis.com/syzbot-assets/446b6da00381/disk-f83a4f2a.raw.xz vmlinux: https://storage.googleapis.com/syzbot-assets/acc2d4e8a1cc/vmlinux-f83a4f2a.xz kernel image: https://storage.googleapis.com/syzbot-assets/cec01f1ca35a/bzImage-f83a4f2a.xz IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: syzbot+f8850bc3986562f79619@syzkaller.appspotmail.com rcu: INFO: rcu_preempt detected stalls on CPUs/tasks: rcu: 0-...!: (2 ticks this GP) idle=e7fc/1/0x4000000000000000 softirq=18961/18961 fqs=0 rcu: (detected by 1, t=10502 jiffies, g=12417, q=367 ncpus=2) Sending NMI from CPU 1 to CPUs 0: NMI backtrace for cpu 0 CPU: 0 UID: 0 PID: 807 Comm: kworker/u8:5 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/18/2025 Workqueue: ipv6_addrconf addrconf_dad_work RIP: 0010:taprio_set_budgets+0x12b/0x3b0 net/sched/sch_taprio.c:671 Code: e8 48 c1 e8 03 48 89 44 24 10 31 db 45 31 e4 4c 89 6c 24 18 bf 10 00 00 00 4c 89 e6 e8 8e 70 24 f8 49 83 fc 0f 48 89 6c 24 30 <0f> 87 8a 01 00 00 4d 8d 2c 2f 4c 89 e8 48 c1 e8 03 48 b9 00 00 00 RSP: 0018:ffffc90000006060 EFLAGS: 00000093 RAX: ffffffff899b5352 RBX: 0000000000000000 RCX: ffff88802481bc00 RDX: 0000000000010100 RSI: 0000000000000000 RDI: 0000000000000010 RBP: 0000000000000000 R08: 0000000000000003 R09: 0000000000000004 R10: dffffc0000000000 R11: fffff52000000c08 R12: 0000000000000000 R13: ffff8880313e32e0 R14: ffff8880743df930 R15: ffff8880743dfc00 FS: 0000000000000000(0000) GS:ffff888125c15000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000055556d266808 CR3: 000000007e704000 CR4: 00000000003526f0 Call Trace: <IRQ> advance_sched+0x963/0xc90 net/sched/sch_taprio.c:982 __run_hrtimer kernel/time/hrtimer.c:1761 [inline] __hrtimer_run_queues+0x52c/0xc60 kernel/time/hrtimer.c:1825 hrtimer_interrupt+0x45b/0xaa0 kernel/time/hrtimer.c:1887 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1039 [inline] __sysvec_apic_timer_interrupt+0x108/0x410 arch/x86/kernel/apic/apic.c:1056 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1050 [inline] sysvec_apic_timer_interrupt+0x52/0xc0 arch/x86/kernel/apic/apic.c:1050 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:stack_trace_consume_entry+0x5/0x280 kernel/stacktrace.c:83 Code: f0 5b 41 5e 5d c3 cc cc cc cc cc e8 05 fc cd 09 0f 1f 44 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 55 <41> 57 41 56 41 55 41 54 53 48 83 ec 18 48 ba 00 00 00 00 00 fc ff RSP: 0018:ffffc90000006518 EFLAGS: 00000286 RAX: ffffffff8184f87d RBX: ffffc900000065e0 RCX: 7a67f0fb8b1bf500 RDX: 0000000000000001 RSI: ffffffff8184f87d RDI: ffffc900000065e0 RBP: ffffc900000065b0 R08: ffffc90003387170 R09: 0000000000000000 R10: ffffc90000006578 R11: ffffffff81ac4b00 R12: ffff88802481bc00 R13: 0000000000000000 R14: ffffffff81ac4b00 R15: ffffc90000006528 arch_stack_walk+0x10d/0x150 arch/x86/kernel/stacktrace.c:27 stack_trace_save+0x9c/0xe0 kernel/stacktrace.c:122 kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3e/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x46/0x50 mm/kasan/generic.c:576 poison_slab_object mm/kasan/common.c:243 [inline] __kasan_slab_free+0x5b/0x80 mm/kasan/common.c:275 kasan_slab_free include/linux/kasan.h:233 [inline] slab_free_hook mm/slub.c:2422 [inline] slab_free mm/slub.c:4695 [inline] kmem_cache_free+0x18f/0x400 mm/slub.c:4797 skb_ext_del include/linux/skbuff.h:4929 [inline] nf_bridge_info_free net/bridge/br_netfilter_hooks.c:156 [inline] br_nf_dev_queue_xmit+0x4ee/0x24a0 net/bridge/br_netfilter_hooks.c:851 NF_HOOK+0x618/0x6b0 include/linux/netfilter.h:318 br_nf_post_routing+0xb66/0xfe0 net/bridge/br_netfilter_hooks.c:966 nf_hook_entry_hookfn include/linux/netfilter.h:158 [inline] nf_hook_slow+0xc5/0x220 net/netfilter/core.c:623 nf_hook include/linux/netfilter.h:273 [inline] NF_HOOK+0x215/0x3c0 include/linux/netfilter.h:316 br_forward_finish+0xd3/0x130 net/bridge/br_forward.c:66 br_nf_hook_thresh net/bridge/br_netfilter_hooks.c:-1 [inline] br_nf_forward_finish+0xa40/0xe60 net/bridge/br_netfilter_hooks.c:662 NF_HOOK+0x618/0x6b0 include/linux/netfilter.h:318 br_nf_forward_ip+0x647/0x7e0 net/bridge/br_netfilter_hooks.c:716 nf_hook_entry_hookfn include/linux/netfilter.h:158 [inline] nf_hook_slow+0xc5/0x220 net/netfilter/core.c:623 nf_hook include/linux/netfilter.h:273 [inline] NF_HOOK+0x215/0x3c0 include/linux/netfilter.h:316 __br_forward+0x41e/0x600 net/bridge/br_forward.c:115 br_handle_frame_finish+0x14b4/0x19b0 net/bridge/br_input.c:221 br_nf_hook_thresh+0x3c3/0x4a0 net/bridge/br_netfilter_hooks.c:-1 br_nf_pre_routing_finish_ipv6+0x948/0xd00 net/bridge/br_netfilter_ipv6.c:-1 NF_HOOK include/linux/netfilter.h:318 [inline] br_nf_pre_routing_ipv6+0x37e/0x6b0 net/bridge/br_netfilter_ipv6.c:184 nf_hook_entry_hookfn include/linux/netfilter.h:158 [inline] nf_hook_bridge_pre net/bridge/br_input.c:283 [inline] br_handle_frame+0x982/0x14c0 net/bridge/br_input.c:434 __netif_receive_skb_core+0x10b6/0x4020 net/core/dev.c:5878 __netif_receive_skb_one_core net/core/dev.c:5989 [inline] __netif_receive_skb+0x72/0x380 net/core/dev.c:6104 process_backlog+0x60e/0x14f0 net/core/dev.c:6456 __napi_poll+0xc7/0x360 net/core/dev.c:7506 napi_poll net/core/dev.c:7569 [inline] net_rx_action+0x707/0xe30 net/core/dev.c:7696 handle_softirqs+0x283/0x870 kernel/softirq.c:579 do_softirq+0xec/0x180 kernel/softirq.c:480 </IRQ> <TASK> __local_bh_enable_ip+0x17d/0x1c0 kernel/softirq.c:407 local_bh_enable include/linux/bottom_half.h:33 [inline] rcu_read_unlock_bh include/linux/rcupdate.h:910 [inline] __dev_queue_xmit+0x1d79/0x3b50 net/core/dev.c:4752 neigh_output include/net/neighbour.h:547 [inline] ip6_finish_output2+0x11fb/0x16a0 net/ipv6/ip6_output.c:141 NF_HOOK include/linux/netfilter.h:318 [inline] ndisc_send_skb+0xb54/0x1440 net/ipv6/ndisc.c:512 ndisc_send_ns+0xcb/0x150 net/ipv6/ndisc.c:670 addrconf_dad_work+0xaae/0x14b0 net/ipv6/addrconf.c:4282 process_one_work kernel/workqueue.c:3236 [inline] process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3319 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3400 kthread+0x70e/0x8a0 kernel/kthread.c:463 ret_from_fork+0x436/0x7d0 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 </TASK> rcu: rcu_preempt kthread timer wakeup didn't happen for 10501 jiffies! g12417 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x402 rcu: Possible timer handling issue on cpu=0 timer-softirq=3323 rcu: rcu_preempt kthread starved for 10502 jiffies! g12417 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x402 ->cpu=0 rcu: Unless rcu_preempt kthread gets sufficient CPU time, OOM is now expected behavior. rcu: RCU grace-period kthread stack dump: task:rcu_preempt state:I stack:26632 pid:16 tgid:16 ppid:2 task_flags:0x208040 flags:0x00004000 Call Trace: <TASK> context_switch kernel/sched/core.c:5357 [inline] __schedule+0x1798/0x4cc0 kernel/sched/core.c:6961 __schedule_loop kernel/sched/core.c:7043 [inline] schedule+0x165/0x360 kernel/sched/core.c:7058 schedule_timeout+0x12b/0x270 kernel/time/sleep_timeout.c:99 rcu_gp_fqs_loop+0x301/0x1540 kernel/rcu/tree.c:2083 rcu_gp_kthread+0x99/0x390 kernel/rcu/tree.c:2285 kthread+0x70e/0x8a0 kernel/kthread.c:463 ret_from_fork+0x436/0x7d0 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 </TASK> --- This report is generated by a bot. It may contain errors. See https://goo.gl/tpsmEJ for more information about syzbot. syzbot engineers can be reached at syzkaller@googlegroups.com. syzbot will keep track of this issue. See: https://goo.gl/tpsmEJ#status for how to communicate with syzbot. If the report is already addressed, let syzbot know by replying with: #syz fix: exact-commit-title If you want syzbot to run the reproducer, reply with: #syz test: git://repo/address.git branch-or-commit-hash If you attach or paste a git patch, syzbot will apply it before testing. If you want to overwrite report's subsystems, reply with: #syz set subsystems: new-subsystem (See the list of subsystem names on the web dashboard) If the report is a duplicate of another one, reply with: #syz dup: exact-subject-of-another-report If you want to undo deduplication, reply with: #syz undup ^ permalink raw reply [flat|nested] 8+ messages in thread
* Forwarded: [syz test] net/sched: taprio: reject too-small software schedule intervals 2026-01-13 18:06 [syzbot] [bridge?] INFO: rcu detected stall in br_handle_frame (6) syzbot @ 2026-08-11 13:43 ` syzbot 0 siblings, 0 replies; 8+ messages in thread From: syzbot @ 2026-08-11 13:43 UTC (permalink / raw) To: linux-kernel, syzkaller-bugs For archival purposes, forwarding an incoming command email to linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com. *** Subject: [syz test] net/sched: taprio: reject too-small software schedule intervals Author: junjie.cao@linux.dev #syz test: git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git dd057113ac7ba5bdd2aed3d9405305911152f911 Signed-off-by: Junjie Cao <junjie.cao@intel.com> diff --git a/net/sched/sch_taprio.c b/net/sched/sch_taprio.c index 299234a5f0fe..f740918a3b17 100644 --- a/net/sched/sch_taprio.c +++ b/net/sched/sch_taprio.c @@ -259,6 +259,27 @@ static int length_to_duration(struct taprio_sched *q, int len) return div_u64(len * atomic64_read(&q->picos_per_byte), PSEC_PER_NSEC); } +/* Software schedules service one hrtimer expiry per entry; an interval + * shorter than the expiry servicing cost rearms the timer in the past + * and storms the CPU. 100us stays above that cost across configurations + * (sub-us with lockdep, more under KASAN) and below any practical + * schedule. + */ +#define TAPRIO_MIN_SW_INTERVAL_NS (100 * NSEC_PER_USEC) + +static s64 taprio_min_interval(struct taprio_sched *q) +{ + s64 min_interval = length_to_duration(q, ETH_ZLEN); + + /* Only pure software schedules arm the per-entry hrtimer. */ + if (!FULL_OFFLOAD_IS_ENABLED(q->flags) && + !TXTIME_ASSIST_IS_ENABLED(q->flags)) + min_interval = max_t(s64, min_interval, + TAPRIO_MIN_SW_INTERVAL_NS); + + return min_interval; +} + static int duration_to_length(struct taprio_sched *q, u64 duration) { return div_u64(duration * PSEC_PER_NSEC, atomic64_read(&q->picos_per_byte)); @@ -1038,7 +1059,7 @@ static int fill_sched_entry(struct taprio_sched *q, struct nlattr **tb, struct sched_entry *entry, struct netlink_ext_ack *extack) { - int min_duration = length_to_duration(q, ETH_ZLEN); + s64 min_duration = taprio_min_interval(q); u32 interval = 0; if (tb[TCA_TAPRIO_SCHED_ENTRY_CMD]) @@ -1166,7 +1187,7 @@ static int parse_taprio_schedule(struct taprio_sched *q, struct nlattr **tb, new->cycle_time = cycle; } - if (new->cycle_time < new->num_entries * length_to_duration(q, ETH_ZLEN)) { + if (new->cycle_time < (s64)new->num_entries * taprio_min_interval(q)) { NL_SET_ERR_MSG(extack, "'cycle_time' is too small"); return -EINVAL; } ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-09-01 7:45 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2025-07-28 23:27 [syzbot] [kernfs?] [mm?] INFO: rcu detected stall in kernfs_fop_open (7) syzbot 2026-08-11 13:42 ` Forwarded: [syz test] net/sched: taprio: reject too-small software schedule intervals syzbot 2026-08-31 8:40 ` [syzbot] [kernfs?] [mm?] INFO: rcu detected stall in kernfs_fop_open (7) Junjie Cao 2026-08-31 9:20 ` [syzbot] [kernfs?] " syzbot 2026-09-01 1:41 ` [syzbot] [kernfs?] [mm?] " Junjie Cao 2026-09-01 7:45 ` [syzbot] [kernfs?] " syzbot 2025-08-22 4:15 [syzbot] [mm?] INFO: rcu detected stall in sys_munmap (2) syzbot 2026-08-11 13:11 ` Forwarded: [syz test] net/sched: taprio: reject too-small software schedule intervals syzbot 2026-01-13 18:06 [syzbot] [bridge?] INFO: rcu detected stall in br_handle_frame (6) syzbot 2026-08-11 13:43 ` Forwarded: [syz test] net/sched: taprio: reject too-small software schedule intervals syzbot
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®