================================ WARNING: inconsistent lock state 6.8.0-syzkaller-08951-gfe46a7dd189e #0 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. syz-executor.3/8007 [HC0[0]:SC1[1]:HE0:SE0] takes: ffff888029e42148 (&timer->lock){+.?.}-{2:2}, at: class_spinlock_irqsave_constructor include/linux/spinlock.h:574 [inline] ffff888029e42148 (&timer->lock){+.?.}-{2:2}, at: snd_timer_interrupt.part.0+0x31/0xd80 sound/core/timer.c:818 {SOFTIRQ-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 task_work_run+0x14e/0x250 kernel/task_work.c:180 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0xa7d/0x2be0 kernel/exit.c:878 do_group_exit+0xd3/0x2a0 kernel/exit.c:1027 get_signal+0x2390/0x2760 kernel/signal.c:2907 arch_do_signal_or_restart+0x90/0x7e0 arch/x86/kernel/signal.c:310 exit_to_user_mode_loop kernel/entry/common.c:105 [inline] exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline] __syscall_exit_to_user_mode_work kernel/entry/common.c:201 [inline] syscall_exit_to_user_mode+0x14a/0x2a0 kernel/entry/common.c:212 do_syscall_64+0xe2/0x260 arch/x86/entry/common.c:89 entry_SYSCALL_64_after_hwframe+0x6d/0x75 irq event stamp: 1067 hardirqs last enabled at (1066): [] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:159 [inline] hardirqs last enabled at (1066): [] _raw_spin_unlock_irq+0x23/0x50 kernel/locking/spinlock.c:202 hardirqs last disabled at (1067): [] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:108 [inline] hardirqs last disabled at (1067): [] _raw_spin_lock_irqsave+0x52/0x60 kernel/locking/spinlock.c:162 softirqs last enabled at (0): [] copy_process+0x24cc/0x9160 kernel/fork.c:2335 softirqs last disabled at (1063): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last disabled at (1063): [] __irq_exit_rcu kernel/softirq.c:633 [inline] softirqs last disabled at (1063): [] irq_exit_rcu+0xb9/0x120 kernel/softirq.c:645 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&timer->lock); lock(&timer->lock); *** DEADLOCK *** 3 locks held by syz-executor.3/8007: #0: ffff88805e5a8658 (&vma->vm_lock->lock){++++}-{3:3}, at: vma_start_read include/linux/mm.h:663 [inline] #0: ffff88805e5a8658 (&vma->vm_lock->lock){++++}-{3:3}, at: lock_vma_under_rcu+0x1e2/0x950 mm/memory.c:5626 #1: ffffffff8d7b08e0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:298 [inline] #1: ffffffff8d7b08e0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:750 [inline] #1: ffffffff8d7b08e0 (rcu_read_lock){....}-{1:2}, at: count_memcg_event_mm.part.0+0x31/0x340 include/linux/memcontrol.h:1118 #2: ffffc90000007cb0 ((&priv->tlist)){+.-.}-{0:0}, at: call_timer_fn+0x11a/0x5b0 kernel/time/timer.c:1789 stack backtrace: CPU: 0 PID: 8007 Comm: syz-executor.3 Not tainted 6.8.0-syzkaller-08951-gfe46a7dd189e #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 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:4567 [inline] __lock_acquire+0x13d4/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_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x3a/0x60 kernel/locking/spinlock.c:162 class_spinlock_irqsave_constructor include/linux/spinlock.h:574 [inline] snd_timer_interrupt.part.0+0x31/0xd80 sound/core/timer.c:818 snd_timer_interrupt sound/core/timer.c:1107 [inline] snd_timer_s_function+0x14f/0x200 sound/core/timer.c:1107 call_timer_fn+0x1a0/0x5b0 kernel/time/timer.c:1792 expire_timers kernel/time/timer.c:1843 [inline] __run_timers+0x74b/0xab0 kernel/time/timer.c:2408 __run_timer_base kernel/time/timer.c:2419 [inline] __run_timer_base kernel/time/timer.c:2412 [inline] run_timer_base+0x111/0x190 kernel/time/timer.c:2428 run_timer_softirq+0x1a/0x40 kernel/time/timer.c:2438 __do_softirq+0x218/0x8de kernel/softirq.c:554 invoke_softirq kernel/softirq.c:428 [inline] __irq_exit_rcu kernel/softirq.c:633 [inline] irq_exit_rcu+0xb9/0x120 kernel/softirq.c:645 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline] sysvec_apic_timer_interrupt+0x95/0xb0 arch/x86/kernel/apic/apic.c:1043 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:write_comp_data+0x34/0x90 kernel/kcov.c:236 Code: 48 8b 15 df e1 76 7e 65 8b 05 e0 e1 76 7e a9 00 01 ff 00 74 0f f6 c4 01 74 59 8b 82 14 16 00 00 85 c0 74 4f 8b 82 f0 15 00 00 <83> f8 03 75 44 48 8b 82 f8 15 00 00 8b 92 f4 15 00 00 48 8b 38 48 RSP: 0000:ffffc900038cfe58 EFLAGS: 00000246 RAX: 0000000000000000 RBX: 0000000000000001 RCX: ffffffff81d0191e RDX: ffff8880298f1e00 RSI: 0000000000000000 RDI: 0000000000000005 RBP: ffff8880298f1e00 R08: 0000000000000005 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000017 R13: 0000000000000000 R14: ffff888064257d10 R15: 0000000000000000 count_memcg_event_mm.part.0+0x8e/0x340 include/linux/memcontrol.h:1119 count_memcg_event_mm include/linux/memcontrol.h:579 [inline] mm_account_fault mm/memory.c:5339 [inline] handle_mm_fault+0x1b8/0xa00 mm/memory.c:5486 do_user_addr_fault+0x426/0x1080 arch/x86/mm/fault.c:1362 handle_page_fault arch/x86/mm/fault.c:1505 [inline] exc_page_fault+0x5c/0xc0 arch/x86/mm/fault.c:1563 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 RIP: 0033:0x7f151cc36fe1 Code: 00 48 83 c4 20 83 fd 20 75 aa 48 8d 3d 3e 32 09 00 31 c0 e8 31 16 ff ff 90 41 57 41 56 41 55 41 54 55 53 48 81 ec f8 01 00 00 05 a8 e6 c9 00 01 e8 43 dd ff ff 48 8b 05 e4 e6 c9 00 31 ff 48 RSP: 002b:00007ffc60c0cdf0 EFLAGS: 00010206 RAX: 0000000000000000 RBX: 0000000000000003 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 000055557fc52788 RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000001 R15: 0000000000000001 ---------------- Code disassembly (best guess): 0: 48 8b 15 df e1 76 7e mov 0x7e76e1df(%rip),%rdx # 0x7e76e1e6 7: 65 8b 05 e0 e1 76 7e mov %gs:0x7e76e1e0(%rip),%eax # 0x7e76e1ee e: a9 00 01 ff 00 test $0xff0100,%eax 13: 74 0f je 0x24 15: f6 c4 01 test $0x1,%ah 18: 74 59 je 0x73 1a: 8b 82 14 16 00 00 mov 0x1614(%rdx),%eax 20: 85 c0 test %eax,%eax 22: 74 4f je 0x73 24: 8b 82 f0 15 00 00 mov 0x15f0(%rdx),%eax * 2a: 83 f8 03 cmp $0x3,%eax <-- trapping instruction 2d: 75 44 jne 0x73 2f: 48 8b 82 f8 15 00 00 mov 0x15f8(%rdx),%rax 36: 8b 92 f4 15 00 00 mov 0x15f4(%rdx),%edx 3c: 48 8b 38 mov (%rax),%rdi 3f: 48 rex.W