================================ WARNING: inconsistent lock state 6.8.0-syzkaller-08951-gfe46a7dd189e #0 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. syz-executor287/5117 [HC0[0]:SC1[1]:HE0:SE0] takes: ffff888029eaa948 (&timer->lock){+.?.}-{2:2}, at: class_spinlock_irqsave_constructor include/linux/spinlock.h:574 [inline] ffff888029eaa948 (&timer->lock){+.?.}-{2:2}, at: snd_timer_interrupt+0x1ff/0x10e0 sound/core/timer.c:818 {SOFTIRQ-ON-W} state was registered at: lock_acquire+0x1e4/0x530 kernel/locking/lockdep.c:5754 __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+0x53/0x8d0 sound/core/timer.c:412 snd_timer_close sound/core/timer.c:464 [inline] snd_timer_user_release+0x138/0x2e0 sound/core/timer.c:1468 __fput+0x42b/0x8a0 fs/file_table.c:422 task_work_run+0x251/0x310 kernel/task_work.c:180 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0xa1b/0x27e0 kernel/exit.c:878 do_group_exit+0x207/0x2c0 kernel/exit.c:1027 __do_sys_exit_group kernel/exit.c:1038 [inline] __se_sys_exit_group kernel/exit.c:1036 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1036 do_syscall_64+0xfd/0x240 entry_SYSCALL_64_after_hwframe+0x6d/0x75 irq event stamp: 1265 hardirqs last enabled at (1264): [] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:159 [inline] hardirqs last enabled at (1264): [] _raw_spin_unlock_irq+0x23/0x50 kernel/locking/spinlock.c:202 hardirqs last disabled at (1265): [] __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:108 [inline] hardirqs last disabled at (1265): [] _raw_spin_lock_irqsave+0xb0/0x120 kernel/locking/spinlock.c:162 softirqs last enabled at (766): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last enabled at (766): [] __irq_exit_rcu+0xf2/0x1c0 kernel/softirq.c:633 softirqs last disabled at (1261): [] invoke_softirq kernel/softirq.c:428 [inline] softirqs last disabled at (1261): [] __irq_exit_rcu+0xf2/0x1c0 kernel/softirq.c:633 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&timer->lock); lock(&timer->lock); *** DEADLOCK *** 2 locks held by syz-executor287/5117: #0: ffff888022e19e20 (&mm->mmap_lock){++++}-{3:3}, at: mmap_write_lock include/linux/mmap_lock.h:108 [inline] #0: ffff888022e19e20 (&mm->mmap_lock){++++}-{3:3}, at: exit_mmap+0x30f/0xd40 mm/mmap.c:3295 #1: ffffc90000007c00 ((&priv->tlist)){+.-.}-{0:0}, at: call_timer_fn+0xc0/0x600 kernel/time/timer.c:1789 stack backtrace: CPU: 0 PID: 5117 Comm: syz-executor287 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+0x241/0x360 lib/dump_stack.c:114 valid_state+0x13a/0x1c0 kernel/locking/lockdep.c:4013 mark_lock_irq+0xbb/0xc20 kernel/locking/lockdep.c:4216 mark_lock+0x223/0x350 kernel/locking/lockdep.c:4678 __lock_acquire+0xbcd/0x1fd0 kernel/locking/lockdep.c:5091 lock_acquire+0x1e4/0x530 kernel/locking/lockdep.c:5754 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162 class_spinlock_irqsave_constructor include/linux/spinlock.h:574 [inline] snd_timer_interrupt+0x1ff/0x10e0 sound/core/timer.c:818 call_timer_fn+0x180/0x600 kernel/time/timer.c:1792 expire_timers kernel/time/timer.c:1843 [inline] __run_timers kernel/time/timer.c:2408 [inline] __run_timer_base+0x66a/0x8e0 kernel/time/timer.c:2419 run_timer_base kernel/time/timer.c:2428 [inline] run_timer_softirq+0xb7/0x170 kernel/time/timer.c:2438 __do_softirq+0x2be/0x943 kernel/softirq.c:554 invoke_softirq kernel/softirq.c:428 [inline] __irq_exit_rcu+0xf2/0x1c0 kernel/softirq.c:633 irq_exit_rcu+0x9/0x30 kernel/softirq.c:645 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline] sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1043 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:get_current arch/x86/include/asm/current.h:49 [inline] RIP: 0010:write_comp_data kernel/kcov.c:235 [inline] RIP: 0010:__sanitizer_cov_trace_const_cmp8+0x8/0x90 kernel/kcov.c:311 Code: 44 0a 20 e9 4a 52 ea 09 66 2e 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 4c 8b 04 24 <65> 48 8b 0c 25 80 d0 03 00 65 8b 05 40 d6 6e 7e a9 00 01 ff 00 74 RSP: 0018:ffffc9000423f618 EFLAGS: 00000246 RAX: ffffffff8158e697 RBX: ffffffff8158e697 RCX: ffff88807f15da00 RDX: 0000000000000000 RSI: ffffffff8158e697 RDI: 0000000000000000 RBP: ffffc9000423f6b0 R08: ffffffff81372702 R09: ffffffff8140a8df R10: 0000000000000003 R11: ffff88807f15da00 R12: ffff88807f15da00 R13: ffffffff8180e0a0 R14: ffffc9000423f700 R15: ffffc9000423f620 arch_stack_walk+0x132/0x1b0 arch/x86/kernel/stacktrace.c:27 stack_trace_save+0x118/0x1d0 kernel/stacktrace.c:122 kasan_save_stack mm/kasan/common.c:47 [inline] kasan_save_track+0x3f/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:579 poison_slab_object+0xa6/0xe0 mm/kasan/common.c:240 __kasan_slab_free+0x37/0x60 mm/kasan/common.c:256 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2106 [inline] slab_free mm/slub.c:4280 [inline] kmem_cache_free+0x102/0x2b0 mm/slub.c:4344 remove_vma mm/mmap.c:146 [inline] exit_mmap+0x6a9/0xd40 mm/mmap.c:3311 __mmput+0x115/0x3c0 kernel/fork.c:1345 exit_mm+0x220/0x310 kernel/exit.c:569 do_exit+0x99e/0x27e0 kernel/exit.c:865 do_group_exit+0x207/0x2c0 kernel/exit.c:1027 __do_sys_exit_group kernel/exit.c:1038 [inline] __se_sys_exit_group kernel/exit.c:1036 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1036 do_syscall_64+0xfd/0x240 entry_SYSCALL_64_after_hwframe+0x6d/0x75 RIP: 0033:0x7f8cb95a91b9 Code: Unable to access opcode bytes at 0x7f8cb95a918f. RSP: 002b:00007ffd32d966f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f8cb95a91b9 RDX: 000000000000003c RSI: 00000000000000e7 RDI: 0000000000000000 RBP: 00007f8cb96282b0 R08: ffffffffffffffb8 R09: 000055556c148610 R10: 000055556c148610 R11: 0000000000000246 R12: 00007f8cb96282b0 R13: 0000000000000000 R14: 00007f8cb9629d80 R15: 00007f8cb957a340 ---------------- Code disassembly (best guess): 0: 44 0a 20 or (%rax),%r12b 3: e9 4a 52 ea 09 jmp 0x9ea5252 8: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) f: 00 00 00 12: 90 nop 13: 90 nop 14: 90 nop 15: 90 nop 16: 90 nop 17: 90 nop 18: 90 nop 19: 90 nop 1a: 90 nop 1b: 90 nop 1c: 90 nop 1d: 90 nop 1e: 90 nop 1f: 90 nop 20: 90 nop 21: 90 nop 22: f3 0f 1e fa endbr64 26: 4c 8b 04 24 mov (%rsp),%r8 * 2a: 65 48 8b 0c 25 80 d0 mov %gs:0x3d080,%rcx <-- trapping instruction 31: 03 00 33: 65 8b 05 40 d6 6e 7e mov %gs:0x7e6ed640(%rip),%eax # 0x7e6ed67a 3a: a9 00 01 ff 00 test $0xff0100,%eax 3f: 74 .byte 0x74