vkms_vblank_simulate: vblank timer overrun ================================ WARNING: inconsistent lock state 6.8.0-syzkaller-08951-gfe46a7dd189e #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. kworker/1:6/5167 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff88802a1ec948 (&timer->lock){?.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline] ffff88802a1ec948 (&timer->lock){?.+.}-{2:2}, at: class_spinlock_constructor include/linux/spinlock.h:561 [inline] ffff88802a1ec948 (&timer->lock){?.+.}-{2:2}, at: snd_hrtimer_callback+0x4d/0x420 sound/core/hrtimer.c:38 {HARDIRQ-ON-W} state was registered at: lock_acquire kernel/locking/lockdep.c:5754 [inline] lock_acquire+0x1b1/0x540 kernel/locking/lockdep.c:5719 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x2e/0x40 kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:351 [inline] class_spinlock_constructor include/linux/spinlock.h:561 [inline] snd_timer_close_locked+0x65/0xbd0 sound/core/timer.c:412 snd_timer_close+0x8b/0xf0 sound/core/timer.c:464 snd_seq_timer_close+0xa4/0x100 sound/core/seq/seq_timer.c:302 queue_delete+0x49/0xa0 sound/core/seq/seq_queue.c:126 snd_seq_queue_delete+0x45/0x60 sound/core/seq/seq_queue.c:188 snd_seq_kernel_client_ctl+0x107/0x1c0 sound/core/seq/seq_clientmgr.c:2526 delete_seq_queue.isra.0+0xc8/0x150 sound/core/seq/oss/seq_oss_init.c:371 odev_release+0x52/0x80 sound/core/seq/oss/seq_oss.c:144 __fput+0x270/0xb80 fs/file_table.c:422 __fput_sync+0x47/0x50 fs/file_table.c:507 __do_sys_close fs/open.c:1556 [inline] __se_sys_close fs/open.c:1541 [inline] __x64_sys_close+0x86/0x100 fs/open.c:1541 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xd2/0x260 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x6d/0x75 irq event stamp: 47578 hardirqs last enabled at (47577): [] queue_delayed_work_on+0xd2/0x130 kernel/workqueue.c:2599 hardirqs last disabled at (47578): [] sysvec_apic_timer_interrupt+0xe/0xb0 arch/x86/kernel/apic/apic.c:1043 softirqs last enabled at (47512): [] spin_unlock_bh include/linux/spinlock.h:396 [inline] softirqs last enabled at (47512): [] nsim_dev_trap_report drivers/net/netdevsim/dev.c:820 [inline] softirqs last enabled at (47512): [] nsim_dev_trap_report_work+0x870/0xc80 drivers/net/netdevsim/dev.c:850 softirqs last disabled at (47510): [] spin_lock_bh include/linux/spinlock.h:356 [inline] softirqs last disabled at (47510): [] nsim_dev_trap_report drivers/net/netdevsim/dev.c:816 [inline] softirqs last disabled at (47510): [] nsim_dev_trap_report_work+0x7e2/0xc80 drivers/net/netdevsim/dev.c:850 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&timer->lock); lock(&timer->lock); *** DEADLOCK *** 2 locks held by kworker/1:6/5167: #0: ffff88801507a948 ((wq_completion)rcu_gp){+.+.}-{0:0}, at: process_one_work+0x1296/0x1a60 kernel/workqueue.c:3229 #1: ffffc90004167d80 ((work_completion)(&(&ssp->srcu_sup->work)->work)){+.+.}-{0:0}, at: process_one_work+0x906/0x1a60 kernel/workqueue.c:3230 stack backtrace: CPU: 1 PID: 5167 Comm: kworker/1:6 Not tainted 6.8.0-syzkaller-08951-gfe46a7dd189e #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Workqueue: rcu_gp process_srcu Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:114 print_usage_bug kernel/locking/lockdep.c:3971 [inline] valid_state kernel/locking/lockdep.c:4013 [inline] mark_lock_irq kernel/locking/lockdep.c:4216 [inline] mark_lock+0x923/0xc60 kernel/locking/lockdep.c:4678 mark_usage kernel/locking/lockdep.c:4564 [inline] __lock_acquire+0x1359/0x3b30 kernel/locking/lockdep.c:5091 lock_acquire kernel/locking/lockdep.c:5754 [inline] lock_acquire+0x1b1/0x540 kernel/locking/lockdep.c:5719 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x2e/0x40 kernel/locking/spinlock.c:154 spin_lock include/linux/spinlock.h:351 [inline] class_spinlock_constructor include/linux/spinlock.h:561 [inline] snd_hrtimer_callback+0x4d/0x420 sound/core/hrtimer.c:38 __run_hrtimer kernel/time/hrtimer.c:1692 [inline] __hrtimer_run_queues+0x20c/0xc20 kernel/time/hrtimer.c:1756 hrtimer_interrupt+0x31b/0x800 kernel/time/hrtimer.c:1818 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1032 [inline] __sysvec_apic_timer_interrupt+0x10f/0x410 arch/x86/kernel/apic/apic.c:1049 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline] sysvec_apic_timer_interrupt+0x90/0xb0 arch/x86/kernel/apic/apic.c:1043 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:queue_delayed_work_on+0x9e/0x130 kernel/workqueue.c:2600 Code: ff 48 89 ee e8 f3 a1 34 00 48 85 ed 75 46 e8 d9 a6 34 00 9c 5b 81 e3 00 02 00 00 31 ff 48 89 de e8 d7 a1 34 00 48 85 db 75 75 bd a6 34 00 44 89 e8 48 83 c4 08 5b 5d 41 5c 41 5d 41 5e 41 5f RSP: 0018:ffffc90004167c90 EFLAGS: 00000293 RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff81585234 RDX: ffff88807c8d0000 RSI: ffffffff8158523e RDI: 0000000000000007 RBP: 0000000000000200 R08: 0000000000000007 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000004 R12: ffff88801509d000 R13: 0000000000000001 R14: ffff88801507a800 R15: 0000000000000000 process_one_work+0x9a9/0x1a60 kernel/workqueue.c:3254 process_scheduled_works kernel/workqueue.c:3335 [inline] worker_thread+0x6c8/0xf70 kernel/workqueue.c:3416 kthread+0x2c1/0x3a0 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:243 vkms_vblank_simulate: vblank timer overrun vkms_vblank_simulate: vblank timer overrun vkms_vblank_simulate: vblank timer overrun vkms_vblank_simulate: vblank timer overrun ---------------- Code disassembly (best guess): 0: ff 48 89 decl -0x77(%rax) 3: ee out %al,(%dx) 4: e8 f3 a1 34 00 call 0x34a1fc 9: 48 85 ed test %rbp,%rbp c: 75 46 jne 0x54 e: e8 d9 a6 34 00 call 0x34a6ec 13: 9c pushf 14: 5b pop %rbx 15: 81 e3 00 02 00 00 and $0x200,%ebx 1b: 31 ff xor %edi,%edi 1d: 48 89 de mov %rbx,%rsi 20: e8 d7 a1 34 00 call 0x34a1fc 25: 48 85 db test %rbx,%rbx 28: 75 75 jne 0x9f * 2a: e8 bd a6 34 00 call 0x34a6ec <-- trapping instruction 2f: 44 89 e8 mov %r13d,%eax 32: 48 83 c4 08 add $0x8,%rsp 36: 5b pop %rbx 37: 5d pop %rbp 38: 41 5c pop %r12 3a: 41 5d pop %r13 3c: 41 5e pop %r14 3e: 41 5f pop %r15