* Re: [syzbot] [mm?] INFO: rcu detected stall in exit_to_user_mode_loop
[not found] <6856d355.a00a0220.137b3.007d.GAE@google.com>
@ 2025-07-28 21:30 ` syzbot
2026-08-17 7:21 ` Junjie Cao
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: syzbot @ 2025-07-28 21:30 UTC (permalink / raw)
To: akpm, cgroups, hannes, jackmanb, linux-kernel, linux-mm, mhocko,
mhocko, muchun.song, netdev, roman.gushchin, shakeel.butt, surenb,
syzkaller-bugs, vbabka, ziy
syzbot has found a reproducer for the following issue on:
HEAD commit: afd8c2c9e2e2 Merge branch 'ipv6-f6i-fib6_siblings-and-rt-f..
git tree: net
console output: https://syzkaller.appspot.com/x/log.txt?x=13c71034580000
kernel config: https://syzkaller.appspot.com/x/.config?x=a4bcc0a11b3192be
dashboard link: https://syzkaller.appspot.com/bug?extid=2642f347f7309b4880dc
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=17b284a2580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=17c71034580000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/6f29edec8e85/disk-afd8c2c9.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/8490ef85f5cd/vmlinux-afd8c2c9.xz
kernel image: https://storage.googleapis.com/syzbot-assets/1357e17669cb/bzImage-afd8c2c9.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+2642f347f7309b4880dc@syzkaller.appspotmail.com
rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
rcu: 0-...!: (3 ticks this GP) idle=8da4/1/0x4000000000000000 softirq=18768/18768 fqs=0
rcu: (detected by 1, t=10502 jiffies, g=13833, q=887 ncpus=2)
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 UID: 0 PID: 5983 Comm: syz-executor Not tainted 6.16.0-rc7-syzkaller-00100-gafd8c2c9e2e2 #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025
RIP: 0010:__lock_acquire+0x316/0xd20 kernel/locking/lockdep.c:5188
Code: 8b 54 24 0c 83 e2 01 c1 e2 12 44 09 e2 41 c1 e6 14 41 09 d6 8b 54 24 10 c1 e2 13 c1 e5 15 09 d5 09 cd 44 09 f5 41 89 6c c7 20 <45> 89 44 c7 24 4c 89 7c 24 10 4d 8d 34 c7 81 e5 ff 1f 00 00 48 0f
RSP: 0018:ffffc90000007b40 EFLAGS: 00000002
RAX: 000000000000000a RBX: ffffffff8e13f0e0 RCX: 0000000000000007
RDX: 0000000000080000 RSI: 0000000000004000 RDI: ffff88802c368000
RBP: 00000000000a4007 R08: 0000000000000000 R09: ffffffff898d70e8
R10: dffffc0000000000 R11: ffffed100fc2785e R12: 0000000000024000
R13: 0000000000000000 R14: 0000000000024000 R15: ffff88802c368af0
FS: 0000000000000000(0000) GS:ffff888125c23000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000055556e2015c8 CR3: 000000000df38000 CR4: 00000000003526f0
Call Trace:
<IRQ>
lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5871
rcu_lock_acquire include/linux/rcupdate.h:331 [inline]
rcu_read_lock include/linux/rcupdate.h:841 [inline]
advance_sched+0xa14/0xc90 net/sched/sch_taprio.c:985
__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+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:debug_lockdep_rcu_enabled+0xf/0x40 kernel/rcu/update.c:320
Code: cc cc cc cc cc cc cc cc cc cc cc 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 31 c0 83 3d 17 30 34 04 00 74 1e <83> 3d 3a 60 34 04 00 74 15 65 48 8b 0c 25 08 d0 9f 92 31 c0 83 b9
RSP: 0018:ffffc90003f0ef70 EFLAGS: 00000202
RAX: 0000000000000000 RBX: ffffffff90d8d001 RCX: ffffc90003f0ff60
RDX: ffffc90003f0f001 RSI: dffffc0000000000 RDI: ffffc90003f0f050
RBP: dffffc0000000000 R08: ffffc90003f0ff48 R09: 0000000000000000
R10: ffffc90003f0f098 R11: fffff520007e1e15 R12: ffffc90003f0ff58
R13: ffffc90003f08000 R14: ffffc90003f0f048 R15: ffffffff8172aae5
rcu_read_unlock include/linux/rcupdate.h:869 [inline]
class_rcu_destructor include/linux/rcupdate.h:1155 [inline]
unwind_next_frame+0x195c/0x2390 arch/x86/kernel/unwind_orc.c:680
arch_stack_walk+0x11c/0x150 arch/x86/kernel/stacktrace.c:25
stack_trace_save+0x9c/0xe0 kernel/stacktrace.c:122
save_stack+0xf5/0x1f0 mm/page_owner.c:156
__reset_page_owner+0x71/0x1f0 mm/page_owner.c:308
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1248 [inline]
free_unref_folios+0xc66/0x14d0 mm/page_alloc.c:2763
folios_put_refs+0x559/0x640 mm/swap.c:992
free_pages_and_swap_cache+0x277/0x520 mm/swap_state.c:264
__tlb_batch_free_encoded_pages mm/mmu_gather.c:136 [inline]
tlb_batch_pages_flush mm/mmu_gather.c:149 [inline]
tlb_flush_mmu_free mm/mmu_gather.c:397 [inline]
tlb_flush_mmu+0x3a0/0x680 mm/mmu_gather.c:404
tlb_finish_mmu+0xc3/0x1d0 mm/mmu_gather.c:497
exit_mmap+0x44c/0xb50 mm/mmap.c:1297
__mmput+0x118/0x420 kernel/fork.c:1121
exit_mm+0x1da/0x2c0 kernel/exit.c:581
do_exit+0x648/0x22e0 kernel/exit.c:952
do_group_exit+0x21c/0x2d0 kernel/exit.c:1105
get_signal+0x1286/0x1340 kernel/signal.c:3034
arch_do_signal_or_restart+0x9a/0x750 arch/x86/kernel/signal.c:337
exit_to_user_mode_loop+0x75/0x110 kernel/entry/common.c:111
exit_to_user_mode_prepare include/linux/entry-common.h:330 [inline]
syscall_exit_to_user_mode_work include/linux/entry-common.h:414 [inline]
syscall_exit_to_user_mode include/linux/entry-common.h:449 [inline]
do_syscall_64+0x2bd/0x3b0 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f730c585213
Code: Unable to access opcode bytes at 0x7f730c5851e9.
RSP: 002b:00007ffe0103af48 EFLAGS: 00000246 ORIG_RAX: 0000000000000038
RAX: fffffffffffffffc RBX: 0000000000000000 RCX: 00007f730c585213
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000001200011
RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000
R10: 000055556e1e67d0 R11: 0000000000000246 R12: 0000000000000000
R13: 00000000000927c0 R14: 000000000003604b R15: 00007ffe0103b0e0
</TASK>
rcu: rcu_preempt kthread timer wakeup didn't happen for 10501 jiffies! g13833 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x402
rcu: Possible timer handling issue on cpu=0 timer-softirq=10563
rcu: rcu_preempt kthread starved for 10502 jiffies! g13833 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:26792 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>
---
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.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [syzbot] [mm?] INFO: rcu detected stall in exit_to_user_mode_loop
2026-08-17 7:21 ` Junjie Cao
@ 2026-08-17 6:02 ` syzbot
0 siblings, 0 replies; 7+ messages in thread
From: syzbot @ 2026-08-17 6:02 UTC (permalink / raw)
To: hdanton, junjie.cao, linux-kernel, netdev, syzkaller-bugs
Hello,
syzbot has tested the proposed patch and the reproducer did not trigger any issue:
Reported-by: syzbot+2642f347f7309b4880dc@syzkaller.appspotmail.com
Tested-by: syzbot+2642f347f7309b4880dc@syzkaller.appspotmail.com
Tested on:
commit: 24ef02f9 net: page_pool: fix UAF in __page_pool_releas..
git tree: git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git
console output: https://syzkaller.appspot.com/x/log.txt?x=15742679580000
kernel config: https://syzkaller.appspot.com/x/.config?x=d07fbc6821d72a61
dashboard link: https://syzkaller.appspot.com/bug?extid=2642f347f7309b4880dc
compiler: gcc (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44
patch: https://syzkaller.appspot.com/x/patch.diff?x=16b1ea25580000
Note: testing is done by a robot and is best-effort only.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [syzbot] [mm?] INFO: rcu detected stall in exit_to_user_mode_loop
2025-07-28 21:30 ` [syzbot] [mm?] INFO: rcu detected stall in exit_to_user_mode_loop syzbot
@ 2026-08-17 7:21 ` Junjie Cao
2026-08-17 6:02 ` syzbot
2026-08-31 8:41 ` Junjie Cao
2026-09-01 1:43 ` Junjie Cao
2 siblings, 1 reply; 7+ messages in thread
From: Junjie Cao @ 2026-08-17 7:21 UTC (permalink / raw)
To: syzbot+2642f347f7309b4880dc; +Cc: linux-kernel, netdev, hdanton
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git 24ef02f934eeb48830cff6b739abc3c62b1d107b
diff --git a/net/sched/sch_taprio.c b/net/sched/sch_taprio.c
index 299234a5f0fe..7519bc5c1aff 100644
--- a/net/sched/sch_taprio.c
+++ b/net/sched/sch_taprio.c
@@ -259,6 +259,26 @@ 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; intervals
+ * shorter than the expiry service cost rearm the timer with an expiry
+ * already in the past and storm the CPU. 100us leaves margin above the
+ * measured cost on debug configurations.
+ */
+#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));
@@ -915,6 +935,51 @@ static bool should_change_schedules(const struct sched_gate_list *admin,
return false;
}
+/* The operational schedule fell behind, e.g. because the timer was delayed
+ * or the reference clock stepped forward. Advancing one entry per timer
+ * expiry would replay the whole backlog from hrtimer context, so skip
+ * complete cycles arithmetically and walk the remaining entries to land on
+ * the entry covering the current time.
+ */
+static void taprio_catch_up(struct sched_gate_list *oper,
+ struct sched_entry **next, ktime_t *next_start,
+ ktime_t *end_time, ktime_t now)
+{
+ int budget = 2 * oper->num_entries + 1;
+ struct sched_entry *entry = *next;
+ ktime_t start = *next_start;
+ ktime_t end = *end_time;
+ s64 behind = ktime_sub(now, end);
+
+ if (oper->cycle_time > 0 && behind >= oper->cycle_time) {
+ s64 jump = div64_s64(behind, oper->cycle_time) * oper->cycle_time;
+
+ start = ktime_add_ns(start, jump);
+ end = ktime_add_ns(end, jump);
+ oper->cycle_end_time = ktime_add_ns(oper->cycle_end_time, jump);
+ }
+
+ while (ktime_before(end, now) && --budget) {
+ if (list_is_last(&entry->list, &oper->entries) ||
+ ktime_compare(end, oper->cycle_end_time) == 0) {
+ entry = list_first_entry(&oper->entries,
+ struct sched_entry, list);
+ oper->cycle_end_time = ktime_add_ns(oper->cycle_end_time,
+ oper->cycle_time);
+ } else {
+ entry = list_next_entry(entry, list);
+ }
+
+ start = end;
+ end = ktime_add_ns(end, entry->interval);
+ end = min_t(ktime_t, end, oper->cycle_end_time);
+ }
+
+ *next = entry;
+ *next_start = start;
+ *end_time = end;
+}
+
static enum hrtimer_restart advance_sched(struct hrtimer *timer)
{
struct taprio_sched *q = container_of(timer, struct taprio_sched,
@@ -924,7 +989,7 @@ 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;
+ ktime_t end_time, next_start, now;
int tc;
spin_lock(&q->current_entry_lock);
@@ -960,14 +1025,19 @@ static enum hrtimer_restart advance_sched(struct hrtimer *timer)
next = list_next_entry(entry, list);
}
- end_time = ktime_add_ns(entry->end_time, next->interval);
+ next_start = entry->end_time;
+ end_time = ktime_add_ns(next_start, next->interval);
end_time = min_t(ktime_t, end_time, oper->cycle_end_time);
+ now = taprio_get_time(q);
+ if (unlikely(ktime_before(end_time, now)))
+ taprio_catch_up(oper, &next, &next_start, &end_time, now);
+
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]);
}
@@ -1038,7 +1108,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 +1236,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 related [flat|nested] 7+ messages in thread
* Re: [syzbot] [mm?] INFO: rcu detected stall in exit_to_user_mode_loop
2025-07-28 21:30 ` [syzbot] [mm?] INFO: rcu detected stall in exit_to_user_mode_loop syzbot
2026-08-17 7:21 ` Junjie Cao
@ 2026-08-31 8:41 ` Junjie Cao
2026-08-31 11:12 ` syzbot
2026-09-01 1:43 ` Junjie Cao
2 siblings, 1 reply; 7+ messages in thread
From: Junjie Cao @ 2026-08-31 8:41 UTC (permalink / raw)
To: syzbot+2642f347f7309b4880dc
Cc: akpm, cgroups, hannes, jackmanb, linux-kernel, linux-mm, mhocko,
mhocko, muchun.song, netdev, roman.gushchin, shakeel.butt, surenb,
syzkaller-bugs, vbabka, ziy, hdanton, 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 related [flat|nested] 7+ messages in thread
* Re: [syzbot] [mm?] INFO: rcu detected stall in exit_to_user_mode_loop
2026-08-31 8:41 ` Junjie Cao
@ 2026-08-31 11:12 ` syzbot
0 siblings, 0 replies; 7+ messages in thread
From: syzbot @ 2026-08-31 11:12 UTC (permalink / raw)
To: akpm, cgroups, davem, edumazet, hannes, hdanton, horms, jackmanb,
jhs, jiri, junjie.cao, kuba, linux-kernel, linux-mm, mhocko,
mhocko, muchun.song, netdev, pabeni, roman.gushchin, shakeel.butt,
surenb, syzkaller-bugs, vbabka, vinicius.gomes, ziy
Hello,
syzbot tried to test the proposed patch but the build/boot failed:
2.992004][ T1] Mandatory Access Control activated.
[ 2.993509][ T1] pnp: PnP ACPI init
[ 3.023863][ T1] pnp: PnP ACPI: found 6 devices
[ 3.105394][ T1] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns
[ 3.113910][ T1] NET: Registered PF_INET protocol family
[ 3.116610][ T1] IP idents hash table entries: 131072 (order: 8, 1048576 bytes, vmalloc)
[ 3.128889][ T1] tcp_listen_portaddr_hash hash table entries: 4096 (order: 7, 294912 bytes, vmalloc)
[ 3.130899][ T1] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, vmalloc)
[ 3.133075][ T1] TCP established hash table entries: 65536 (order: 7, 524288 bytes, vmalloc)
[ 3.144444][ T1] TCP bind hash table entries: 65536 (order: 12, 9437184 bytes, vmalloc hugepage)
[ 3.151706][ T1] TCP: Hash tables configured (established 65536 bind 65536)
[ 3.155107][ T1] MPTCP token hash table entries: 8192 (order: 8, 720896 bytes, vmalloc)
[ 3.158207][ T1] UDP hash table entries: 4096 (order: 8, 1048576 bytes, vmalloc)
[ 3.161213][ T1] NET: Registered PF_UNIX/PF_LOCAL protocol family
[ 3.166692][ T1] RPC: Registered named UNIX socket transport module.
[ 3.167740][ T1] RPC: Registered udp transport module.
[ 3.168610][ T1] RPC: Registered tcp transport module.
[ 3.169492][ T1] RPC: Registered tcp-with-tls transport module.
[ 3.170446][ T1] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 3.187812][ T1] NET: Registered PF_XDP protocol family
[ 3.189221][ T1] pci_bus 0000:00: resource 4 [io 0x0000-0x0cf7 window]
[ 3.190367][ T1] pci_bus 0000:00: resource 5 [io 0x0d00-0xffff window]
[ 3.191848][ T1] pci_bus 0000:00: resource 6 [mem 0x000a0000-0x000bffff window]
[ 3.193134][ T1] pci_bus 0000:00: resource 7 [mem 0xc0000000-0xfebfefff window]
[ 3.195979][ T1] pci 0000:00:00.0: Limiting direct PCI/PCI transfers
[ 3.197272][ T1] PCI: CLS 0 bytes, default 64
[ 3.198358][ T1] PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
[ 3.199469][ T1] software IO TLB: mapped [mem 0x00000000b4400000-0x00000000b8400000] (64MB)
[ 3.201954][ T1] ACPI: bus type thunderbolt registered
[ 3.211140][ T1] RAPL PMU: API unit is 2^-32 Joules, 0 fixed counters, 10737418240 ms ovfl timer
[ 3.216011][ T61] kworker/u8:1 (61) used greatest stack depth: 27880 bytes left
[ 3.236610][ T1] kvm_amd: CPU 0 isn't AMD or Hygon
[ 3.236649][ T1] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x285d5483c8d, max_idle_ns: 440795228937 ns
[ 3.239738][ T1] clocksource: Switched to clocksource tsc
[ 3.247879][ T67] kworker/u8:3 (67) used greatest stack depth: 27160 bytes left
[ 3.274579][ T1] Initialise system trusted keyrings
[ 3.278300][ T1] workingset: timestamp_bits=40 (anon: 35) max_order=21 bucket_order=0 (anon: 0)
[ 3.286066][ T1] DLM installed
[ 3.291910][ T1] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 3.299536][ T1] NFS: Registering the id_resolver key type
[ 3.299710][ T1] Key type id_resolver registered
[ 3.299721][ T1] Key type id_legacy registered
[ 3.299981][ T1] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 3.300091][ T1] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[ 3.304030][ T1] smbdirect: subsystem loading...
[ 3.312200][ T1] smbdirect: subsystem loaded
[ 3.342789][ T1] Key type cifs.spnego registered
[ 3.343043][ T1] Key type cifs.idmap registered
[ 3.346819][ T1] ntfs3: Enabled Linux POSIX ACLs support
[ 3.346847][ T1] ntfs3: Read-only LZX/Xpress compression included
[ 3.347118][ T1] jffs2: version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
[ 3.349230][ T1] romfs: ROMFS MTD (C) 2007 Red Hat, Inc.
[ 3.349425][ T1] QNX4 filesystem 0.2.3 registered.
[ 3.349531][ T1] qnx6: QNX6 filesystem 1.0.0 registered.
[ 3.350763][ T1] fuse: init (API version 7.46)
[ 3.354681][ T1] orangefs_debugfs_init: called with debug mask: :none: :0:
[ 3.355943][ T1] orangefs_init: module version upstream loaded
[ 3.356821][ T1] JFS: nTxBlock = 8192, nTxLock = 65536
[ 3.369044][ T1] SGI XFS with ACLs, security attributes, realtime, scrub, repair, quota, no debug enabled
[ 3.378590][ T1] 9p: Installing v9fs 9p2000 file system support
[ 3.380623][ T1] NILFS version 2 loaded
[ 3.381303][ T1] befs: version: 0.9.3
[ 3.382815][ T1] ocfs2: Registered cluster interface o2cb
[ 3.384592][ T1] ocfs2: Registered cluster interface user
[ 3.386061][ T1] OCFS2 User DLM kernel interface loaded
[ 3.408890][ T1] gfs2: GFS2 installed
[ 3.423843][ T1] ceph: loaded (mds proto 32)
[ 3.437963][ T1] NET: Registered PF_ALG protocol family
[ 3.439495][ T1] async_tx: api initialized (async)
[ 3.440455][ T1] Key type asymmetric registered
[ 3.441477][ T1] Asymmetric key parser 'x509' registered
[ 3.442418][ T1] Asymmetric key parser 'pkcs8' registered
[ 3.443295][ T1] Key type pkcs7_test registered
[ 3.444626][ T1] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 239)
[ 3.448227][ T1] io scheduler mq-deadline registered
[ 3.449247][ T1] io scheduler kyber registered
[ 3.450679][ T1] io scheduler bfq registered
[ 3.452609][ T1] raid6: skipped pq benchmark and selected avx512x4
[ 3.470190][ T1] input: Power Button as /devices/platform/LNXPWRBN:00/input/input0
[ 3.473842][ T1] ACPI: button: Power Button [PWRF]
[ 3.477749][ T1] input: Sleep Button as /devices/platform/LNXSLPBN:00/input/input1
[ 3.480757][ T1] ACPI: button: Sleep Button [SLPF]
[ 3.501883][ T1] ioatdma: Intel(R) QuickData Technology Driver 5.00
[ 3.538986][ T1] ACPI: \_SB_.LNKC: Enabled at IRQ 11
[ 3.540120][ T1] virtio-pci 0000:00:03.0: virtio_pci: leaving for legacy driver
[ 3.573242][ T1] ACPI: \_SB_.LNKD: Enabled at IRQ 10
[ 3.574257][ T1] virtio-pci 0000:00:04.0: virtio_pci: leaving for legacy driver
[ 3.611123][ T1] ACPI: \_SB_.LNKB: Enabled at IRQ 10
[ 3.612311][ T1] virtio-pci 0000:00:06.0: virtio_pci: leaving for legacy driver
[ 4.026288][ T629] kworker/u8:6 (629) used greatest stack depth: 26904 bytes left
[ 4.103079][ T1] N_HDLC line discipline registered with maxframe=4096
[ 4.105350][ T1] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 4.114516][ T1] 00:02: ttyS0 I/O:0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[ 4.129686][ T1] 00:03: ttyS1 I/O:0x2f8 (irq = 3, base_baud = 115200) is a 16550A
[ 4.144792][ T1] 00:04: ttyS2 I/O:0x3e8 (irq = 6, base_baud = 115200) is a 16550A
[ 4.169157][ T1] 00:05: ttyS3 I/O:0x2e8 (irq = 7, base_baud = 115200) is a 16550A
[ 4.206372][ T1] Non-volatile memory driver v1.3
[ 4.228763][ T1] usbcore: registered new interface driver xillyusb
[ 4.234701][ T1] ACPI: bus type drm_connector registered
[ 4.245698][ T1] [drm] Initialized vgem 1.0.0 for vgem on minor 0
[ 4.252028][ T1] ------------[ cut here ]------------
[ 4.252067][ T1] [PLANE:35:plane-0] pixel format with alpha exposed but blend mode not setup
[ 4.252085][ T1] WARNING: drivers/gpu/drm/drm_mode_config.c:872 at drm_mode_config_validate+0xfb4/0x1be0, CPU#0: swapper/0/1
[ 4.256488][ T1] Modules linked in:
[ 4.257080][ T1] CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not tainted syzkaller #0 PREEMPT(full)
[ 4.258850][ T1] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/05/2026
[ 4.260606][ T1] RIP: 0010:drm_mode_config_validate+0xfbb/0x1be0
[ 4.261603][ T1] Code: 00 49 8b 57 18 48 89 f8 48 c1 e8 03 0f b6 04 28 84 c0 74 08 3c 03 0f 8e 00 0b 00 00 48 8d 3d 5c 1f 7e 0b 41 8b b7 c8 00 00 00 <67> 48 0f b9 3a e9 fa fd ff ff 48 8b 5c 24 20 e8 d1 aa 39 fc 48 8d
[ 4.264757][ T1] RSP: 0000:ffffc90000067c18 EFLAGS: 00010246
[ 4.265631][ T1] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
[ 4.266846][ T1] RDX: ffff88802708ff80 RSI: 0000000000000023 RDI: ffffffff91504ba0
[ 4.268445][ T1] RBP: dffffc0000000000 R08: 0000000000000001 R09: 0000000000000000
[ 4.269744][ T1] R10: 0000000000000001 R11: 0000000000000000 R12: ffffed1004ea1e23
[ 4.270879][ T1] R13: ffffed1004ea1e24 R14: 0000000000000001 R15: ffff88802750f028
[ 4.272125][ T1] FS: 0000000000000000(0000) GS:ffff888123b65000(0000) knlGS:0000000000000000
[ 4.273520][ T1] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 4.274598][ T1] CR2: ffff88823ffff000 CR3: 000000000eb96000 CR4: 00000000003526f0
[ 4.275805][ T1] Call Trace:
[ 4.276304][ T1] <TASK>
[ 4.276744][ T1] drm_dev_register+0x56e/0x7b0
[ 4.277432][ T1] vkms_create+0x491/0x5b0
[ 4.278450][ T1] ? __pfx_vkms_init+0x10/0x10
[ 4.279187][ T1] vkms_init+0x98/0xe0
[ 4.279870][ T1] do_one_initcall+0x11c/0x6f0
[ 4.280657][ T1] ? __pfx_do_one_initcall+0x10/0x10
[ 4.281473][ T1] ? kernel_init_freeable+0x4ca/0x7b0
[ 4.282372][ T1] kernel_init_freeable+0x6ea/0x7b0
[ 4.283205][ T1] ? __pfx_kernel_init+0x10/0x10
[ 4.283952][ T1] kernel_init+0x21/0x1e0
[ 4.284623][ T1] ? __pfx_kernel_init+0x10/0x10
[ 4.285469][ T1] ret_from_fork+0x730/0xd60
[ 4.286179][ T1] ? __pfx_ret_from_fork+0x10/0x10
[ 4.286964][ T1] ? __switch_to+0x800/0x10f0
[ 4.288061][ T1] ? __pfx_kernel_init+0x10/0x10
[ 4.288883][ T1] ret_from_fork_asm+0x1a/0x30
[ 4.289745][ T1] </TASK>
[ 4.290229][ T1] Kernel panic - not syncing: kernel: panic_on_warn set ...
[ 4.291328][ T1] CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not tainted syzkaller #0 PREEMPT(full)
[ 4.292619][ T1] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/05/2026
[ 4.294006][ T1] Call Trace:
[ 4.294490][ T1] <TASK>
[ 4.294982][ T1] dump_stack_lvl+0x100/0x190
[ 4.295673][ T1] vpanic+0x553/0x970
[ 4.296729][ T1] ? __pfx_vpanic+0x10/0x10
[ 4.297560][ T1] panic+0xd1/0xe0
[ 4.297698][ T1] ? __pfx_panic+0x10/0x10
[ 4.297698][ T1] check_panic_on_warn.cold+0x19/0x34
[ 4.297698][ T1] ? drm_mode_config_validate+0xfb4/0x1be0
[ 4.297698][ T1] __warn.cold+0x191/0x318
[ 4.297698][ T1] __report_bug+0x30f/0x440
[ 4.297698][ T1] ? drm_mode_config_validate+0xfb4/0x1be0
[ 4.297698][ T1] ? __pfx___report_bug+0x10/0x10
[ 4.297698][ T1] ? reacquire_held_locks+0xdd/0x1f0
[ 4.297698][ T1] report_bug_entry+0xe2/0x290
[ 4.297698][ T1] ? drm_mode_config_validate+0xfbb/0x1be0
[ 4.297698][ T1] handle_bug+0x1cd/0x2a0
[ 4.297698][ T1] exc_invalid_op+0x17/0x50
[ 4.297698][ T1] asm_exc_invalid_op+0x1a/0x20
[ 4.297698][ T1] RIP: 0010:drm_mode_config_validate+0xfbb/0x1be0
[ 4.297698][ T1] Code: 00 49 8b 57 18 48 89 f8 48 c1 e8 03 0f b6 04 28 84 c0 74 08 3c 03 0f 8e 00 0b 00 00 48 8d 3d 5c 1f 7e 0b 41 8b b7 c8 00 00 00 <67> 48 0f b9 3a e9 fa fd ff ff 48 8b 5c 24 20 e8 d1 aa 39 fc 48 8d
[ 4.297698][ T1] RSP: 0000:ffffc90000067c18 EFLAGS: 00010246
[ 4.297698][ T1] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
[ 4.297698][ T1] RDX: ffff88802708ff80 RSI: 0000000000000023 RDI: ffffffff91504ba0
[ 4.297698][ T1] RBP: dffffc0000000000 R08: 0000000000000001 R09: 0000000000000000
[ 4.297698][ T1] R10: 0000000000000001 R11: 0000000000000000 R12: ffffed1004ea1e23
[ 4.297698][ T1] R13: ffffed1004ea1e24 R14: 0000000000000001 R15: ffff88802750f028
[ 4.297698][ T1] ? drm_mode_config_validate+0xf76/0x1be0
[ 4.297698][ T1] drm_dev_register+0x56e/0x7b0
[ 4.297698][ T1] vkms_create+0x491/0x5b0
[ 4.297698][ T1] ? __pfx_vkms_init+0x10/0x10
[ 4.297698][ T1] vkms_init+0x98/0xe0
[ 4.297698][ T1] do_one_initcall+0x11c/0x6f0
[ 4.297698][ T1] ? __pfx_do_one_initcall+0x10/0x10
[ 4.297698][ T1] ? kernel_init_freeable+0x4ca/0x7b0
[ 4.297698][ T1] kernel_init_freeable+0x6ea/0x7b0
[ 4.297698][ T1] ? __pfx_kernel_init+0x10/0x10
[ 4.297698][ T1] kernel_init+0x21/0x1e0
[ 4.297698][ T1] ? __pfx_kernel_init+0x10/0x10
[ 4.297698][ T1] ret_from_fork+0x730/0xd60
[ 4.297698][ T1] ? __pfx_ret_from_fork+0x10/0x10
[ 4.297698][ T1] ? __switch_to+0x800/0x10f0
[ 4.297698][ T1] ? __pfx_kernel_init+0x10/0x10
[ 4.297698][ T1] ret_from_fork_asm+0x1a/0x30
[ 4.297698][ T1] </TASK>
[ 4.297698][ T1] Kernel Offset: disabled
[ 4.297698][ 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-build1798266567=/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 4cb2b096987
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}}' -ldflags="-s -w -X github.com/google/syzkaller/prog.GitRevision=4cb2b096987c8122dc6b37eb51200b1ca7991e0f -X github.com/google/syzkaller/prog.gitRevisionDate=20260727-130118" ./sys/syz-sysgen | grep -q false || go install -ldflags="-s -w -X github.com/google/syzkaller/prog.GitRevision=4cb2b096987c8122dc6b37eb51200b1ca7991e0f -X github.com/google/syzkaller/prog.gitRevisionDate=20260727-130118" ./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=4cb2b096987c8122dc6b37eb51200b1ca7991e0f -X github.com/google/syzkaller/prog.gitRevisionDate=20260727-130118" -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=\"4cb2b096987c8122dc6b37eb51200b1ca7991e0f\"
/usr/bin/ld: /tmp/ccZHlTeq.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
./tools/check-syzos.sh 2>/dev/null
Error text is too large and was truncated, full error text is at:
https://syzkaller.appspot.com/x/error.txt?x=14ce4349580000
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=9cc692b98d9b4fdb
dashboard link: https://syzkaller.appspot.com/bug?extid=2642f347f7309b4880dc
compiler: gcc (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44
patch: https://syzkaller.appspot.com/x/patch.diff?x=11aef379580000
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [syzbot] [mm?] INFO: rcu detected stall in exit_to_user_mode_loop
2025-07-28 21:30 ` [syzbot] [mm?] INFO: rcu detected stall in exit_to_user_mode_loop syzbot
2026-08-17 7:21 ` Junjie Cao
2026-08-31 8:41 ` Junjie Cao
@ 2026-09-01 1:43 ` Junjie Cao
2026-09-01 8:22 ` syzbot
2 siblings, 1 reply; 7+ messages in thread
From: Junjie Cao @ 2026-09-01 1:43 UTC (permalink / raw)
To: syzbot+2642f347f7309b4880dc
Cc: akpm, cgroups, hannes, jackmanb, linux-kernel, linux-mm, mhocko,
mhocko, muchun.song, netdev, roman.gushchin, shakeel.butt, surenb,
syzkaller-bugs, vbabka, ziy, hdanton, 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 related [flat|nested] 7+ messages in thread
* Re: [syzbot] [mm?] INFO: rcu detected stall in exit_to_user_mode_loop
2026-09-01 1:43 ` Junjie Cao
@ 2026-09-01 8:22 ` syzbot
0 siblings, 0 replies; 7+ messages in thread
From: syzbot @ 2026-09-01 8:22 UTC (permalink / raw)
To: akpm, cgroups, davem, edumazet, hannes, hdanton, horms, jackmanb,
jhs, jiri, junjie.cao, kuba, linux-kernel, linux-mm, mhocko,
mhocko, muchun.song, netdev, pabeni, roman.gushchin, shakeel.butt,
surenb, syzkaller-bugs, vbabka, vinicius.gomes, ziy
Hello,
syzbot has tested the proposed patch and the reproducer did not trigger any issue:
Reported-by: syzbot+2642f347f7309b4880dc@syzkaller.appspotmail.com
Tested-by: syzbot+2642f347f7309b4880dc@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=123d1379580000
kernel config: https://syzkaller.appspot.com/x/.config?x=9cc692b98d9b4fdb
dashboard link: https://syzkaller.appspot.com/bug?extid=2642f347f7309b4880dc
compiler: gcc (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44
patch: https://syzkaller.appspot.com/x/patch.diff?x=16f7eb79580000
Note: testing is done by a robot and is best-effort only.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-09-01 8:22 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <6856d355.a00a0220.137b3.007d.GAE@google.com>
2025-07-28 21:30 ` [syzbot] [mm?] INFO: rcu detected stall in exit_to_user_mode_loop syzbot
2026-08-17 7:21 ` Junjie Cao
2026-08-17 6:02 ` syzbot
2026-08-31 8:41 ` Junjie Cao
2026-08-31 11:12 ` syzbot
2026-09-01 1:43 ` Junjie Cao
2026-09-01 8:22 ` syzbot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox