======================================================== WARNING: possible irq lock inversion dependency detected 6.8.0-syzkaller-11405-g906a93befec8 #0 Not tainted -------------------------------------------------------- syz-executor.1/3903 just changed the state of lock: ffff0000140cb948 (&timer->lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:351 [inline] ffff0000140cb948 (&timer->lock){+.+.}-{2:2}, at: class_spinlock_constructor include/linux/spinlock.h:561 [inline] ffff0000140cb948 (&timer->lock){+.+.}-{2:2}, at: snd_timer_close_locked+0x54/0x924 sound/core/timer.c:412 but this lock was taken by another, SOFTIRQ-safe lock in the past: (&group->lock#2){..-.}-{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#2); lock(&timer->lock); lock(&group->lock#2); *** DEADLOCK *** 3 locks held by syz-executor.1/3903: #0: ffff8000879582a8 (register_mutex#4){+.+.}-{3:3}, at: odev_release+0x44/0x78 sound/core/seq/oss/seq_oss.c:143 #1: ffff000013139578 (&q->timer_mutex){+.+.}-{3:3}, at: queue_delete+0x2c/0xac sound/core/seq/seq_queue.c:124 #2: ffff80008793c388 (register_mutex){+.+.}-{3:3}, at: class_mutex_constructor include/linux/mutex.h:169 [inline] #2: ffff80008793c388 (register_mutex){+.+.}-{3:3}, at: snd_timer_close+0x90/0xf8 sound/core/timer.c:463 the shortest dependencies between 2nd lock and 1st lock: -> (&group->lock#2){..-.}-{2:2} { IN-SOFTIRQ-W at: lock_acquire kernel/locking/lockdep.c:5754 [inline] lock_acquire+0x480/0x7c8 kernel/locking/lockdep.c:5719 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x58/0x80 kernel/locking/spinlock.c:162 _snd_pcm_stream_lock_irqsave+0x80/0xa0 sound/core/pcm_native.c:170 class_pcm_stream_lock_irqsave_constructor include/sound/pcm.h:669 [inline] snd_pcm_period_elapsed+0x1c/0x4c sound/core/pcm_lib.c:1904 loopback_jiffies_timer_function+0x168/0x1fc sound/drivers/aloop.c:713 call_timer_fn+0x1c8/0x788 kernel/time/timer.c:1792 expire_timers kernel/time/timer.c:1843 [inline] __run_timers+0x6b4/0x958 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+0x110/0x180 kernel/time/timer.c:2428 run_timer_softirq+0x1c/0x44 kernel/time/timer.c:2438 __do_softirq+0x2e4/0xd9c kernel/softirq.c:554 ____do_softirq+0x10/0x1c arch/arm64/kernel/irq.c:81 call_on_irq_stack+0x24/0x4c arch/arm64/kernel/entry.S:889 do_softirq_own_stack+0x1c/0x2c arch/arm64/kernel/irq.c:86 invoke_softirq kernel/softirq.c:435 [inline] __irq_exit_rcu+0x334/0x434 kernel/softirq.c:633 irq_exit_rcu+0x14/0x80 kernel/softirq.c:645 el0_interrupt+0x68/0x1e0 arch/arm64/kernel/entry-common.c:795 __el0_irq_handler_common+0x18/0x24 arch/arm64/kernel/entry-common.c:802 el0t_64_irq_handler+0x10/0x1c arch/arm64/kernel/entry-common.c:807 el0t_64_irq+0x190/0x194 arch/arm64/kernel/entry.S:599 INITIAL USE at: lock_acquire kernel/locking/lockdep.c:5754 [inline] lock_acquire+0x480/0x7c8 kernel/locking/lockdep.c:5719 __raw_spin_lock_irq include/linux/spinlock_api_smp.h:119 [inline] _raw_spin_lock_irq+0x54/0x74 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] class_pcm_stream_lock_irq_constructor include/sound/pcm.h:666 [inline] snd_pcm_hw_params+0x100/0x13ec sound/core/pcm_native.c:740 snd_pcm_kernel_ioctl+0x114/0x274 sound/core/pcm_native.c:3434 snd_pcm_oss_change_params_locked+0x1208/0x28b4 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/0x164 sound/core/oss/pcm_oss.c:1164 snd_pcm_oss_sync+0x174/0x64c sound/core/oss/pcm_oss.c:1730 snd_pcm_oss_release+0x1dc/0x250 sound/core/oss/pcm_oss.c:2575 __fput+0x1a4/0x92c fs/file_table.c:422 __fput_sync+0x74/0x84 fs/file_table.c:507 __do_sys_close fs/open.c:1556 [inline] __se_sys_close fs/open.c:1541 [inline] __arm64_sys_close+0x6c/0xbc fs/open.c:1541 __invoke_syscall arch/arm64/kernel/syscall.c:34 [inline] invoke_syscall+0x6c/0x258 arch/arm64/kernel/syscall.c:48 el0_svc_common.constprop.0+0xac/0x230 arch/arm64/kernel/syscall.c:133 do_el0_svc+0x40/0x58 arch/arm64/kernel/syscall.c:152 el0_svc+0x50/0x180 arch/arm64/kernel/entry-common.c:712 el0t_64_sync_handler+0x100/0x12c arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598 } ... key at: [] __key.5+0x0/0x40 ... acquired at: __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x58/0x80 kernel/locking/spinlock.c:162 class_spinlock_irqsave_constructor include/linux/spinlock.h:574 [inline] snd_timer_notify+0xc0/0x2c8 sound/core/timer.c:1040 snd_pcm_timer_notify sound/core/pcm_native.c:622 [inline] snd_pcm_post_stop+0x150/0x1a8 sound/core/pcm_native.c:1520 snd_pcm_action_single+0xe8/0x120 sound/core/pcm_native.c:1289 snd_pcm_action+0x7c/0x98 sound/core/pcm_native.c:1370 snd_pcm_stop sound/core/pcm_native.c:1543 [inline] snd_pcm_drop+0xf8/0x208 sound/core/pcm_native.c:2208 snd_pcm_kernel_ioctl+0x1c4/0x274 sound/core/pcm_native.c:3444 snd_pcm_oss_sync+0x1a8/0x64c sound/core/oss/pcm_oss.c:1734 snd_pcm_oss_release+0x1dc/0x250 sound/core/oss/pcm_oss.c:2575 __fput+0x1a4/0x92c fs/file_table.c:422 __fput_sync+0x74/0x84 fs/file_table.c:507 __do_sys_close fs/open.c:1556 [inline] __se_sys_close fs/open.c:1541 [inline] __arm64_sys_close+0x6c/0xbc fs/open.c:1541 __invoke_syscall arch/arm64/kernel/syscall.c:34 [inline] invoke_syscall+0x6c/0x258 arch/arm64/kernel/syscall.c:48 el0_svc_common.constprop.0+0xac/0x230 arch/arm64/kernel/syscall.c:133 do_el0_svc+0x40/0x58 arch/arm64/kernel/syscall.c:152 el0_svc+0x50/0x180 arch/arm64/kernel/entry-common.c:712 el0t_64_sync_handler+0x100/0x12c arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598 -> (&timer->lock){+.+.}-{2:2} { HARDIRQ-ON-W at: lock_acquire kernel/locking/lockdep.c:5754 [inline] lock_acquire+0x480/0x7c8 kernel/locking/lockdep.c:5719 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x48/0x60 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+0x54/0x924 sound/core/timer.c:412 snd_timer_close+0x9c/0xf8 sound/core/timer.c:464 snd_seq_timer_close+0x7c/0xcc sound/core/seq/seq_timer.c:302 queue_delete+0x50/0xac sound/core/seq/seq_queue.c:126 snd_seq_queue_delete+0x2c/0x4c sound/core/seq/seq_queue.c:188 snd_seq_ioctl_delete_queue+0x6c/0xa0 sound/core/seq/seq_clientmgr.c:1597 snd_seq_kernel_client_ctl+0xd4/0x1d8 sound/core/seq/seq_clientmgr.c:2526 delete_seq_queue.isra.0+0xb4/0x118 sound/core/seq/oss/seq_oss_init.c:371 snd_seq_oss_release+0x138/0x194 sound/core/seq/oss/seq_oss_init.c:416 odev_release+0x4c/0x78 sound/core/seq/oss/seq_oss.c:144 __fput+0x1a4/0x92c fs/file_table.c:422 __fput_sync+0x74/0x84 fs/file_table.c:507 __do_sys_close fs/open.c:1556 [inline] __se_sys_close fs/open.c:1541 [inline] __arm64_sys_close+0x6c/0xbc fs/open.c:1541 __invoke_syscall arch/arm64/kernel/syscall.c:34 [inline] invoke_syscall+0x6c/0x258 arch/arm64/kernel/syscall.c:48 el0_svc_common.constprop.0+0xac/0x230 arch/arm64/kernel/syscall.c:133 do_el0_svc+0x40/0x58 arch/arm64/kernel/syscall.c:152 el0_svc+0x50/0x180 arch/arm64/kernel/entry-common.c:712 el0t_64_sync_handler+0x100/0x12c arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598 SOFTIRQ-ON-W at: lock_acquire kernel/locking/lockdep.c:5754 [inline] lock_acquire+0x480/0x7c8 kernel/locking/lockdep.c:5719 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x48/0x60 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+0x54/0x924 sound/core/timer.c:412 snd_timer_close+0x9c/0xf8 sound/core/timer.c:464 snd_seq_timer_close+0x7c/0xcc sound/core/seq/seq_timer.c:302 queue_delete+0x50/0xac sound/core/seq/seq_queue.c:126 snd_seq_queue_delete+0x2c/0x4c sound/core/seq/seq_queue.c:188 snd_seq_ioctl_delete_queue+0x6c/0xa0 sound/core/seq/seq_clientmgr.c:1597 snd_seq_kernel_client_ctl+0xd4/0x1d8 sound/core/seq/seq_clientmgr.c:2526 delete_seq_queue.isra.0+0xb4/0x118 sound/core/seq/oss/seq_oss_init.c:371 snd_seq_oss_release+0x138/0x194 sound/core/seq/oss/seq_oss_init.c:416 odev_release+0x4c/0x78 sound/core/seq/oss/seq_oss.c:144 __fput+0x1a4/0x92c fs/file_table.c:422 __fput_sync+0x74/0x84 fs/file_table.c:507 __do_sys_close fs/open.c:1556 [inline] __se_sys_close fs/open.c:1541 [inline] __arm64_sys_close+0x6c/0xbc fs/open.c:1541 __invoke_syscall arch/arm64/kernel/syscall.c:34 [inline] invoke_syscall+0x6c/0x258 arch/arm64/kernel/syscall.c:48 el0_svc_common.constprop.0+0xac/0x230 arch/arm64/kernel/syscall.c:133 do_el0_svc+0x40/0x58 arch/arm64/kernel/syscall.c:152 el0_svc+0x50/0x180 arch/arm64/kernel/entry-common.c:712 el0t_64_sync_handler+0x100/0x12c arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598 INITIAL USE at: lock_acquire kernel/locking/lockdep.c:5754 [inline] lock_acquire+0x480/0x7c8 kernel/locking/lockdep.c:5719 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x58/0x80 kernel/locking/spinlock.c:162 class_spinlock_irqsave_constructor include/linux/spinlock.h:574 [inline] snd_timer_notify+0xc0/0x2c8 sound/core/timer.c:1040 snd_pcm_timer_notify sound/core/pcm_native.c:622 [inline] snd_pcm_post_stop+0x150/0x1a8 sound/core/pcm_native.c:1520 snd_pcm_action_single+0xe8/0x120 sound/core/pcm_native.c:1289 snd_pcm_action+0x7c/0x98 sound/core/pcm_native.c:1370 snd_pcm_stop sound/core/pcm_native.c:1543 [inline] snd_pcm_drop+0xf8/0x208 sound/core/pcm_native.c:2208 snd_pcm_kernel_ioctl+0x1c4/0x274 sound/core/pcm_native.c:3444 snd_pcm_oss_sync+0x1a8/0x64c sound/core/oss/pcm_oss.c:1734 snd_pcm_oss_release+0x1dc/0x250 sound/core/oss/pcm_oss.c:2575 __fput+0x1a4/0x92c fs/file_table.c:422 __fput_sync+0x74/0x84 fs/file_table.c:507 __do_sys_close fs/open.c:1556 [inline] __se_sys_close fs/open.c:1541 [inline] __arm64_sys_close+0x6c/0xbc fs/open.c:1541 __invoke_syscall arch/arm64/kernel/syscall.c:34 [inline] invoke_syscall+0x6c/0x258 arch/arm64/kernel/syscall.c:48 el0_svc_common.constprop.0+0xac/0x230 arch/arm64/kernel/syscall.c:133 do_el0_svc+0x40/0x58 arch/arm64/kernel/syscall.c:152 el0_svc+0x50/0x180 arch/arm64/kernel/entry-common.c:712 el0t_64_sync_handler+0x100/0x12c arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598 } ... key at: [] __key.6+0x0/0x40 ... acquired at: mark_usage kernel/locking/lockdep.c:4591 [inline] __lock_acquire+0x850/0x6b7c kernel/locking/lockdep.c:5091 lock_acquire kernel/locking/lockdep.c:5754 [inline] lock_acquire+0x480/0x7c8 kernel/locking/lockdep.c:5719 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x48/0x60 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+0x54/0x924 sound/core/timer.c:412 snd_timer_close+0x9c/0xf8 sound/core/timer.c:464 snd_seq_timer_close+0x7c/0xcc sound/core/seq/seq_timer.c:302 queue_delete+0x50/0xac sound/core/seq/seq_queue.c:126 snd_seq_queue_delete+0x2c/0x4c sound/core/seq/seq_queue.c:188 snd_seq_ioctl_delete_queue+0x6c/0xa0 sound/core/seq/seq_clientmgr.c:1597 snd_seq_kernel_client_ctl+0xd4/0x1d8 sound/core/seq/seq_clientmgr.c:2526 delete_seq_queue.isra.0+0xb4/0x118 sound/core/seq/oss/seq_oss_init.c:371 snd_seq_oss_release+0x138/0x194 sound/core/seq/oss/seq_oss_init.c:416 odev_release+0x4c/0x78 sound/core/seq/oss/seq_oss.c:144 __fput+0x1a4/0x92c fs/file_table.c:422 __fput_sync+0x74/0x84 fs/file_table.c:507 __do_sys_close fs/open.c:1556 [inline] __se_sys_close fs/open.c:1541 [inline] __arm64_sys_close+0x6c/0xbc fs/open.c:1541 __invoke_syscall arch/arm64/kernel/syscall.c:34 [inline] invoke_syscall+0x6c/0x258 arch/arm64/kernel/syscall.c:48 el0_svc_common.constprop.0+0xac/0x230 arch/arm64/kernel/syscall.c:133 do_el0_svc+0x40/0x58 arch/arm64/kernel/syscall.c:152 el0_svc+0x50/0x180 arch/arm64/kernel/entry-common.c:712 el0t_64_sync_handler+0x100/0x12c arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598 stack backtrace: CPU: 0 PID: 3903 Comm: syz-executor.1 Not tainted 6.8.0-syzkaller-11405-g906a93befec8 #0 Hardware name: linux,dummy-virt (DT) Call trace: dump_backtrace+0x9c/0x11c arch/arm64/kernel/stacktrace.c:317 show_stack+0x18/0x24 arch/arm64/kernel/stacktrace.c:324 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xa4/0xf4 lib/dump_stack.c:114 dump_stack+0x1c/0x28 lib/dump_stack.c:123 print_irq_inversion_bug.part.0+0x358/0x4c8 kernel/locking/lockdep.c:4080 print_irq_inversion_bug kernel/locking/lockdep.c:4033 [inline] check_usage_backwards kernel/locking/lockdep.c:4146 [inline] mark_lock_irq kernel/locking/lockdep.c:4236 [inline] mark_lock+0x7e8/0x19b8 kernel/locking/lockdep.c:4678 mark_usage kernel/locking/lockdep.c:4591 [inline] __lock_acquire+0x850/0x6b7c kernel/locking/lockdep.c:5091 lock_acquire kernel/locking/lockdep.c:5754 [inline] lock_acquire+0x480/0x7c8 kernel/locking/lockdep.c:5719 __raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline] _raw_spin_lock+0x48/0x60 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+0x54/0x924 sound/core/timer.c:412 snd_timer_close+0x9c/0xf8 sound/core/timer.c:464 snd_seq_timer_close+0x7c/0xcc sound/core/seq/seq_timer.c:302 queue_delete+0x50/0xac sound/core/seq/seq_queue.c:126 snd_seq_queue_delete+0x2c/0x4c sound/core/seq/seq_queue.c:188 snd_seq_ioctl_delete_queue+0x6c/0xa0 sound/core/seq/seq_clientmgr.c:1597 snd_seq_kernel_client_ctl+0xd4/0x1d8 sound/core/seq/seq_clientmgr.c:2526 delete_seq_queue.isra.0+0xb4/0x118 sound/core/seq/oss/seq_oss_init.c:371 snd_seq_oss_release+0x138/0x194 sound/core/seq/oss/seq_oss_init.c:416 odev_release+0x4c/0x78 sound/core/seq/oss/seq_oss.c:144 __fput+0x1a4/0x92c fs/file_table.c:422 __fput_sync+0x74/0x84 fs/file_table.c:507 __do_sys_close fs/open.c:1556 [inline] __se_sys_close fs/open.c:1541 [inline] __arm64_sys_close+0x6c/0xbc fs/open.c:1541 __invoke_syscall arch/arm64/kernel/syscall.c:34 [inline] invoke_syscall+0x6c/0x258 arch/arm64/kernel/syscall.c:48 el0_svc_common.constprop.0+0xac/0x230 arch/arm64/kernel/syscall.c:133 do_el0_svc+0x40/0x58 arch/arm64/kernel/syscall.c:152 el0_svc+0x50/0x180 arch/arm64/kernel/entry-common.c:712 el0t_64_sync_handler+0x100/0x12c arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598