======================================================== WARNING: possible irq lock inversion dependency detected 6.8.0-rc2-syzkaller #0 Not tainted -------------------------------------------------------- swapper/0/0 just changed the state of lock: ffff888103330110 (&group->lock){..-.}-{2:2}, at: snd_pcm_period_elapsed+0x1a/0xa0 sound/core/pcm_lib.c:1907 but this lock took another, SOFTIRQ-unsafe lock in the past: (&timer->lock){+.+.}-{2:2} and interrupts could create inverse lock ordering between them. other info that might help us debug this: Possible interrupt unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&timer->lock); local_irq_disable(); lock(&group->lock); lock(&timer->lock); lock(&group->lock); *** DEADLOCK *** no locks held by swapper/0/0. the shortest dependencies between 2nd lock and 1st lock: -> (&timer->lock){+.+.}-{2:2} { HARDIRQ-ON-W at: lock_acquire+0xea/0x270 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+0x2a/0x290 sound/core/timer.c:412 snd_timer_close+0x40/0x80 sound/core/timer.c:464 snd_seq_timer_close+0x43/0x60 sound/core/seq/seq_timer.c:326 queue_delete sound/core/seq/seq_queue.c:134 [inline] snd_seq_queue_delete+0xaf/0x120 sound/core/seq/seq_queue.c:196 delete_seq_queue sound/core/seq/oss/seq_oss_init.c:371 [inline] snd_seq_oss_release+0x88/0xd0 sound/core/seq/oss/seq_oss_init.c:416 odev_release+0x27/0x40 sound/core/seq/oss/seq_oss.c:144 __fput+0xf4/0x290 fs/file_table.c:376 __do_sys_close fs/open.c:1554 [inline] __se_sys_close+0x6a/0xc0 fs/open.c:1539 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xa7/0x190 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x6f/0x77 SOFTIRQ-ON-W at: lock_acquire+0xea/0x270 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+0x2a/0x290 sound/core/timer.c:412 snd_timer_close+0x40/0x80 sound/core/timer.c:464 snd_seq_timer_close+0x43/0x60 sound/core/seq/seq_timer.c:326 queue_delete sound/core/seq/seq_queue.c:134 [inline] snd_seq_queue_delete+0xaf/0x120 sound/core/seq/seq_queue.c:196 delete_seq_queue sound/core/seq/oss/seq_oss_init.c:371 [inline] snd_seq_oss_release+0x88/0xd0 sound/core/seq/oss/seq_oss_init.c:416 odev_release+0x27/0x40 sound/core/seq/oss/seq_oss.c:144 __fput+0xf4/0x290 fs/file_table.c:376 __do_sys_close fs/open.c:1554 [inline] __se_sys_close+0x6a/0xc0 fs/open.c:1539 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xa7/0x190 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x6f/0x77 INITIAL USE at: lock_acquire+0xea/0x270 kernel/locking/lockdep.c:5754 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x61/0xa0 kernel/locking/spinlock.c:162 class_spinlock_irqsave_constructor include/linux/spinlock.h:574 [inline] snd_timer_notify+0x5b/0x140 sound/core/timer.c:1040 snd_pcm_timer_notify sound/core/pcm_native.c:618 [inline] snd_pcm_post_stop+0x49/0x80 sound/core/pcm_native.c:1528 snd_pcm_action+0xcf/0x100 sound/core/pcm_native.c:1372 snd_pcm_stop sound/core/pcm_native.c:1551 [inline] snd_pcm_drop+0x7b/0xd0 sound/core/pcm_native.c:2231 snd_pcm_oss_sync+0xb2/0x420 sound/core/oss/pcm_oss.c:1735 snd_pcm_oss_release+0x44/0xe0 sound/core/oss/pcm_oss.c:2577 __fput+0xf4/0x290 fs/file_table.c:376 __do_sys_close fs/open.c:1554 [inline] __se_sys_close+0x6a/0xc0 fs/open.c:1539 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xa7/0x190 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x6f/0x77 } ... key at: [] snd_timer_new.__key+0x0/0x10 ... acquired at: __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x61/0xa0 kernel/locking/spinlock.c:162 class_spinlock_irqsave_constructor include/linux/spinlock.h:574 [inline] snd_timer_notify+0x5b/0x140 sound/core/timer.c:1040 snd_pcm_timer_notify sound/core/pcm_native.c:618 [inline] snd_pcm_post_stop+0x49/0x80 sound/core/pcm_native.c:1528 snd_pcm_action+0xcf/0x100 sound/core/pcm_native.c:1372 snd_pcm_stop sound/core/pcm_native.c:1551 [inline] snd_pcm_drop+0x7b/0xd0 sound/core/pcm_native.c:2231 snd_pcm_oss_sync+0xb2/0x420 sound/core/oss/pcm_oss.c:1735 snd_pcm_oss_release+0x44/0xe0 sound/core/oss/pcm_oss.c:2577 __fput+0xf4/0x290 fs/file_table.c:376 __do_sys_close fs/open.c:1554 [inline] __se_sys_close+0x6a/0xc0 fs/open.c:1539 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xa7/0x190 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x6f/0x77 -> (&group->lock){..-.}-{2:2} { IN-SOFTIRQ-W at: lock_acquire+0xea/0x270 kernel/locking/lockdep.c:5754 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x61/0xa0 kernel/locking/spinlock.c:162 snd_pcm_period_elapsed+0x1a/0xa0 sound/core/pcm_lib.c:1907 dummy_hrtimer_callback+0x1a/0x50 sound/drivers/dummy.c:385 __run_hrtimer kernel/time/hrtimer.c:1688 [inline] __hrtimer_run_queues+0x1a6/0x330 kernel/time/hrtimer.c:1752 hrtimer_run_softirq+0xa4/0x180 kernel/time/hrtimer.c:1769 __do_softirq+0x149/0x3d1 kernel/softirq.c:553 invoke_softirq kernel/softirq.c:427 [inline] __irq_exit_rcu+0x6f/0x100 kernel/softirq.c:632 irq_exit_rcu+0x9/0x30 kernel/softirq.c:644 sysvec_apic_timer_interrupt+0x92/0xb0 arch/x86/kernel/apic/apic.c:1076 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:649 native_safe_halt arch/x86/include/asm/irqflags.h:48 [inline] arch_safe_halt arch/x86/include/asm/irqflags.h:86 [inline] acpi_safe_halt+0x20/0x30 drivers/acpi/processor_idle.c:112 acpi_idle_enter+0xc1/0xe0 drivers/acpi/processor_idle.c:707 cpuidle_enter_state+0xff/0x260 drivers/cpuidle/cpuidle.c:267 cpuidle_enter+0x28/0x40 drivers/cpuidle/cpuidle.c:388 call_cpuidle kernel/sched/idle.c:134 [inline] cpuidle_idle_call kernel/sched/idle.c:215 [inline] do_idle+0x1c8/0x270 kernel/sched/idle.c:312 cpu_startup_entry+0x24/0x30 kernel/sched/idle.c:410 rest_init+0x1e5/0x1f0 init/main.c:730 arch_call_rest_init+0x9/0x10 init/main.c:827 start_kernel+0x314/0x330 init/main.c:1072 x86_64_start_reservations+0x2a/0x30 arch/x86/kernel/head64.c:555 x86_64_start_kernel+0x94/0xa0 arch/x86/kernel/head64.c:536 secondary_startup_64_no_verify+0x15f/0x16b INITIAL USE at: lock_acquire+0xea/0x270 kernel/locking/lockdep.c:5754 __raw_spin_lock_irq include/linux/spinlock_api_smp.h:119 [inline] _raw_spin_lock_irq+0x5c/0x90 kernel/locking/spinlock.c:170 spin_lock_irq include/linux/spinlock.h:376 [inline] snd_pcm_group_lock_irq sound/core/pcm_native.c:97 [inline] snd_pcm_stream_lock_irq sound/core/pcm_native.c:136 [inline] snd_pcm_hw_params+0xa7/0x7a0 sound/core/pcm_native.c:736 snd_pcm_oss_change_params_locked+0xbcc/0x1130 sound/core/oss/pcm_oss.c:965 snd_pcm_oss_change_params sound/core/oss/pcm_oss.c:1105 [inline] snd_pcm_oss_make_ready+0xac/0x110 sound/core/oss/pcm_oss.c:1164 snd_pcm_oss_sync+0x95/0x420 sound/core/oss/pcm_oss.c:1731 snd_pcm_oss_release+0x44/0xe0 sound/core/oss/pcm_oss.c:2577 __fput+0xf4/0x290 fs/file_table.c:376 __do_sys_close fs/open.c:1554 [inline] __se_sys_close+0x6a/0xc0 fs/open.c:1539 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xa7/0x190 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x6f/0x77 } ... key at: [] snd_pcm_group_init.__key+0x0/0x10 ... acquired at: mark_lock+0xe9/0x150 kernel/locking/lockdep.c:4678 __lock_acquire+0x4c5/0x2490 kernel/locking/lockdep.c:5091 lock_acquire+0xea/0x270 kernel/locking/lockdep.c:5754 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x61/0xa0 kernel/locking/spinlock.c:162 snd_pcm_period_elapsed+0x1a/0xa0 sound/core/pcm_lib.c:1907 dummy_hrtimer_callback+0x1a/0x50 sound/drivers/dummy.c:385 __run_hrtimer kernel/time/hrtimer.c:1688 [inline] __hrtimer_run_queues+0x1a6/0x330 kernel/time/hrtimer.c:1752 hrtimer_run_softirq+0xa4/0x180 kernel/time/hrtimer.c:1769 __do_softirq+0x149/0x3d1 kernel/softirq.c:553 invoke_softirq kernel/softirq.c:427 [inline] __irq_exit_rcu+0x6f/0x100 kernel/softirq.c:632 irq_exit_rcu+0x9/0x30 kernel/softirq.c:644 sysvec_apic_timer_interrupt+0x92/0xb0 arch/x86/kernel/apic/apic.c:1076 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:649 native_safe_halt arch/x86/include/asm/irqflags.h:48 [inline] arch_safe_halt arch/x86/include/asm/irqflags.h:86 [inline] acpi_safe_halt+0x20/0x30 drivers/acpi/processor_idle.c:112 acpi_idle_enter+0xc1/0xe0 drivers/acpi/processor_idle.c:707 cpuidle_enter_state+0xff/0x260 drivers/cpuidle/cpuidle.c:267 cpuidle_enter+0x28/0x40 drivers/cpuidle/cpuidle.c:388 call_cpuidle kernel/sched/idle.c:134 [inline] cpuidle_idle_call kernel/sched/idle.c:215 [inline] do_idle+0x1c8/0x270 kernel/sched/idle.c:312 cpu_startup_entry+0x24/0x30 kernel/sched/idle.c:410 rest_init+0x1e5/0x1f0 init/main.c:730 arch_call_rest_init+0x9/0x10 init/main.c:827 start_kernel+0x314/0x330 init/main.c:1072 x86_64_start_reservations+0x2a/0x30 arch/x86/kernel/head64.c:555 x86_64_start_kernel+0x94/0xa0 arch/x86/kernel/head64.c:536 secondary_startup_64_no_verify+0x15f/0x16b stack backtrace: CPU: 0 PID: 0 Comm: swapper/0 Not tainted 6.8.0-rc2-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/29/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x8d/0xe0 lib/dump_stack.c:106 print_irq_inversion_bug+0x2c1/0x2d0 kernel/locking/lockdep.c:4080 mark_lock_irq+0x32b/0x500 kernel/locking/lockdep.c:4243 mark_lock+0xe9/0x150 kernel/locking/lockdep.c:4678 __lock_acquire+0x4c5/0x2490 kernel/locking/lockdep.c:5091 lock_acquire+0xea/0x270 kernel/locking/lockdep.c:5754 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x61/0xa0 kernel/locking/spinlock.c:162 snd_pcm_period_elapsed+0x1a/0xa0 sound/core/pcm_lib.c:1907 dummy_hrtimer_callback+0x1a/0x50 sound/drivers/dummy.c:385 __run_hrtimer kernel/time/hrtimer.c:1688 [inline] __hrtimer_run_queues+0x1a6/0x330 kernel/time/hrtimer.c:1752 hrtimer_run_softirq+0xa4/0x180 kernel/time/hrtimer.c:1769 __do_softirq+0x149/0x3d1 kernel/softirq.c:553 invoke_softirq kernel/softirq.c:427 [inline] __irq_exit_rcu+0x6f/0x100 kernel/softirq.c:632 irq_exit_rcu+0x9/0x30 kernel/softirq.c:644 sysvec_apic_timer_interrupt+0x92/0xb0 arch/x86/kernel/apic/apic.c:1076 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:649 RIP: 0010:native_irq_disable arch/x86/include/asm/irqflags.h:37 [inline] RIP: 0010:arch_local_irq_disable arch/x86/include/asm/irqflags.h:72 [inline] RIP: 0010:acpi_safe_halt+0x20/0x30 drivers/acpi/processor_idle.c:113 Code: 90 90 90 90 90 90 90 90 90 90 65 48 8b 05 18 a8 95 7d 48 f7 00 08 00 00 00 75 10 66 90 0f 00 2d 00 86 46 00 f3 0f 1e fa fb f4 c3 cc cc cc cc 66 2e 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90 RSP: 0018:ffffffff83403e00 EFLAGS: 00000246 RAX: ffffffff83423780 RBX: ffff8881016fdc64 RCX: ffff88813bc00000 RDX: 0000000000000001 RSI: ffff8881016fdc00 RDI: ffff8881016fdc64 RBP: ffff888100ae0000 R08: 0000000af1184887 R09: 00000000000000ff R10: 0000000000000003 R11: ffffffff826d2710 R12: 0000000000000001 R13: 0000000000000000 R14: 0000000000000001 R15: ffffffff83643cb0 acpi_idle_enter+0xc1/0xe0 drivers/acpi/processor_idle.c:707 cpuidle_enter_state+0xff/0x260 drivers/cpuidle/cpuidle.c:267 cpuidle_enter+0x28/0x40 drivers/cpuidle/cpuidle.c:388 call_cpuidle kernel/sched/idle.c:134 [inline] cpuidle_idle_call kernel/sched/idle.c:215 [inline] do_idle+0x1c8/0x270 kernel/sched/idle.c:312 cpu_startup_entry+0x24/0x30 kernel/sched/idle.c:410 rest_init+0x1e5/0x1f0 init/main.c:730 arch_call_rest_init+0x9/0x10 init/main.c:827 start_kernel+0x314/0x330 init/main.c:1072 x86_64_start_reservations+0x2a/0x30 arch/x86/kernel/head64.c:555 x86_64_start_kernel+0x94/0xa0 arch/x86/kernel/head64.c:536 secondary_startup_64_no_verify+0x15f/0x16b ---------------- Code disassembly (best guess): 0: 90 nop 1: 90 nop 2: 90 nop 3: 90 nop 4: 90 nop 5: 90 nop 6: 90 nop 7: 90 nop 8: 90 nop 9: 90 nop a: 65 48 8b 05 18 a8 95 mov %gs:0x7d95a818(%rip),%rax # 0x7d95a82a 11: 7d 12: 48 f7 00 08 00 00 00 testq $0x8,(%rax) 19: 75 10 jne 0x2b 1b: 66 90 xchg %ax,%ax 1d: 0f 00 2d 00 86 46 00 verw 0x468600(%rip) # 0x468624 24: f3 0f 1e fa endbr64 28: fb sti 29: f4 hlt * 2a: fa cli <-- trapping instruction 2b: c3 ret 2c: cc int3 2d: cc int3 2e: cc int3 2f: cc int3 30: 66 2e 0f 1f 84 00 00 cs nopw 0x0(%rax,%rax,1) 37: 00 00 00 3a: 90 nop 3b: 90 nop 3c: 90 nop 3d: 90 nop 3e: 90 nop 3f: 90 nop