================================ WARNING: inconsistent lock state 6.10.0-syzkaller-08280-g68b59730459e #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-R} -> {IN-HARDIRQ-W} usage. swapper/0/0 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff8880b943e858 (kn->active#31){-+.+}-{0:0}, at: raw_spin_rq_lock_nested+0xb0/0x140 kernel/sched/core.c:568 {HARDIRQ-ON-R} state was registered at: lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5753 kernfs_get_active+0x101/0x170 fs/kernfs/dir.c:443 kernfs_fop_open+0x93/0xd10 fs/kernfs/file.c:601 do_dentry_open+0x972/0x1440 fs/open.c:959 vfs_open+0x3e/0x330 fs/open.c:1089 do_open fs/namei.c:3727 [inline] path_openat+0x2b3e/0x3470 fs/namei.c:3886 do_filp_open+0x235/0x490 fs/namei.c:3913 do_sys_openat2+0x13e/0x1d0 fs/open.c:1416 do_sys_open fs/open.c:1431 [inline] __do_sys_openat fs/open.c:1447 [inline] __se_sys_openat fs/open.c:1442 [inline] __x64_sys_openat+0x247/0x2a0 fs/open.c:1442 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f irq event stamp: 39015306 hardirqs last enabled at (39015305): [] tick_nohz_idle_enter+0x246/0x310 kernel/time/tick-sched.c:1265 hardirqs last disabled at (39015306): [] sysvec_apic_timer_interrupt+0xe/0xc0 arch/x86/kernel/apic/apic.c:1043 softirqs last enabled at (39015214): [] __do_softirq kernel/softirq.c:588 [inline] softirqs last enabled at (39015214): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last enabled at (39015214): [] __irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637 softirqs last disabled at (39015189): [] __do_softirq kernel/softirq.c:588 [inline] softirqs last disabled at (39015189): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last disabled at (39015189): [] __irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(kn->active#31); lock(kn->active#31); *** DEADLOCK *** 1 lock held by swapper/0/0: #0: ffff88802f288a18 (&p->pi_lock){-.-.}-{2:2}, at: class_raw_spinlock_irqsave_constructor include/linux/spinlock.h:551 [inline] #0: ffff88802f288a18 (&p->pi_lock){-.-.}-{2:2}, at: try_to_wake_up+0xb0/0x1470 kernel/sched/core.c:4051 stack backtrace: CPU: 0 PID: 0 Comm: swapper/0 Not tainted 6.10.0-syzkaller-08280-g68b59730459e #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:114 valid_state+0x13a/0x1c0 kernel/locking/lockdep.c:4012 mark_lock_irq+0xe2/0xc20 kernel/locking/lockdep.c:4221 mark_lock+0x223/0x350 kernel/locking/lockdep.c:4677 mark_usage kernel/locking/lockdep.c:4563 [inline] __lock_acquire+0xb8e/0x1fd0 kernel/locking/lockdep.c:5090 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5753 _raw_spin_lock_nested+0x31/0x40 kernel/locking/spinlock.c:378 raw_spin_rq_lock_nested+0xb0/0x140 kernel/sched/core.c:568 raw_spin_rq_lock kernel/sched/sched.h:1415 [inline] rq_lock kernel/sched/sched.h:1714 [inline] ttwu_queue kernel/sched/core.c:3844 [inline] try_to_wake_up+0x7cc/0x1470 kernel/sched/core.c:4167 hrtimer_wakeup+0x62/0x80 kernel/time/hrtimer.c:1925 __run_hrtimer kernel/time/hrtimer.c:1689 [inline] __hrtimer_run_queues+0x59d/0xd50 kernel/time/hrtimer.c:1753 hrtimer_interrupt+0x396/0x990 kernel/time/hrtimer.c:1815 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1032 [inline] __sysvec_apic_timer_interrupt+0x112/0x3f0 arch/x86/kernel/apic/apic.c:1049 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline] sysvec_apic_timer_interrupt+0xa1/0xc0 arch/x86/kernel/apic/apic.c:1043 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:tick_nohz_idle_enter+0x24f/0x310 kernel/time/tick-sched.c:1266 Code: 03 42 80 3c 38 00 74 08 4c 89 f7 e8 2b 03 75 00 41 80 0e 01 4c 89 f7 e8 df 00 00 00 e8 da 2e 16 00 fb 48 c7 04 24 0e 36 e0 45 <4b> c7 04 27 00 00 00 00 65 48 8b 04 25 28 00 00 00 48 3b 44 24 48 RSP: 0018:ffffffff8e007ce0 EFLAGS: 00000282 RAX: 76d62eb046dcaa00 RBX: 0000000000000000 RCX: ffffffff947db703 RDX: dffffc0000000000 RSI: ffffffff8bcac9a0 RDI: ffffffff8c205b20 RBP: ffffffff8e007d70 R08: ffffffff8faec7af R09: 1ffffffff1f5d8f5 R10: dffffc0000000000 R11: fffffbfff1f5d8f6 R12: 1ffffffff1c00f9c R13: 0000000000000000 R14: ffff8880b942d188 R15: dffffc0000000000 do_idle+0x9f/0x5d0 kernel/sched/idle.c:271 cpu_startup_entry+0x42/0x60 kernel/sched/idle.c:424 rest_init+0x2dc/0x300 init/main.c:747 start_kernel+0x47a/0x500 init/main.c:1103 x86_64_start_reservations+0x2a/0x30 arch/x86/kernel/head64.c:507 x86_64_start_kernel+0x99/0xa0 arch/x86/kernel/head64.c:488 common_startup_64+0x13e/0x147 ---------------- Code disassembly (best guess): 0: 03 42 80 add -0x80(%rdx),%eax 3: 3c 38 cmp $0x38,%al 5: 00 74 08 4c add %dh,0x4c(%rax,%rcx,1) 9: 89 f7 mov %esi,%edi b: e8 2b 03 75 00 call 0x75033b 10: 41 80 0e 01 orb $0x1,(%r14) 14: 4c 89 f7 mov %r14,%rdi 17: e8 df 00 00 00 call 0xfb 1c: e8 da 2e 16 00 call 0x162efb 21: fb sti 22: 48 c7 04 24 0e 36 e0 movq $0x45e0360e,(%rsp) 29: 45 * 2a: 4b c7 04 27 00 00 00 movq $0x0,(%r15,%r12,1) <-- trapping instruction 31: 00 32: 65 48 8b 04 25 28 00 mov %gs:0x28,%rax 39: 00 00 3b: 48 3b 44 24 48 cmp 0x48(%rsp),%rax