============================================
WARNING: possible recursive locking detected
5.16.0-rc5-next-20211216-syzkaller #0 Not tainted
--------------------------------------------
syz-executor889/3861 is trying to acquire lock:
ffff888075982130 (&runtime->sleep){..-.}-{2:2}, at: io_poll_double_wake+0x2c3/0x7e0 fs/io_uring.c:5549 fs/io_uring.c:5549
but task is already holding lock:
ffff888075984130 (&runtime->sleep){..-.}-{2:2}, at: __wake_up_common_lock+0xb4/0x130 kernel/sched/wait.c:137 kernel/sched/wait.c:137
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0
----
lock(&runtime->sleep);
lock(&runtime->sleep);
*** DEADLOCK ***
May be due to missing lock nesting notation
3 locks held by syz-executor889/3861:
#0: ffff88823bddcbd8 (&ctx->completion_lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:354 [inline]
#0: ffff88823bddcbd8 (&ctx->completion_lock){+.+.}-{2:2}, at: spin_lock include/linux/spinlock.h:354 [inline] fs/io_uring.c:5827
#0: ffff88823bddcbd8 (&ctx->completion_lock){+.+.}-{2:2}, at: io_poll_remove_all+0x3c/0x214 fs/io_uring.c:5827 fs/io_uring.c:5827
#1: ffff88814accf110 (&group->lock){..-.}-{2:2}, at: _snd_pcm_stream_lock_irqsave+0x9f/0xd0 sound/core/pcm_native.c:170 sound/core/pcm_native.c:170
#2: ffff888075984130 (&runtime->sleep){..-.}-{2:2}, at: __wake_up_common_lock+0xb4/0x130 kernel/sched/wait.c:137 kernel/sched/wait.c:137
stack backtrace:
CPU: 0 PID: 3861 Comm: syz-executor889 Not tainted 5.16.0-rc5-next-20211216-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
__dump_stack lib/dump_stack.c:88 [inline] lib/dump_stack.c:106
dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 lib/dump_stack.c:106
print_deadlock_bug kernel/locking/lockdep.c:2956 [inline]
check_deadlock kernel/locking/lockdep.c:2999 [inline]
validate_chain kernel/locking/lockdep.c:3788 [inline]
print_deadlock_bug kernel/locking/lockdep.c:2956 [inline] kernel/locking/lockdep.c:5027
check_deadlock kernel/locking/lockdep.c:2999 [inline] kernel/locking/lockdep.c:5027
validate_chain kernel/locking/lockdep.c:3788 [inline] kernel/locking/lockdep.c:5027
__lock_acquire.cold+0x149/0x3ab kernel/locking/lockdep.c:5027 kernel/locking/lockdep.c:5027
lock_acquire kernel/locking/lockdep.c:5639 [inline]
lock_acquire kernel/locking/lockdep.c:5639 [inline] kernel/locking/lockdep.c:5604
lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5604 kernel/locking/lockdep.c:5604
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] kernel/locking/spinlock.c:162
_raw_spin_lock_irqsave+0x39/0x50 kernel/locking/spinlock.c:162 kernel/locking/spinlock.c:162
io_poll_double_wake+0x2c3/0x7e0 fs/io_uring.c:5549 fs/io_uring.c:5549
__wake_up_common+0x147/0x650 kernel/sched/wait.c:108 kernel/sched/wait.c:108
__wake_up_common_lock+0xd0/0x130 kernel/sched/wait.c:138 kernel/sched/wait.c:138
snd_pcm_update_state+0x46a/0x540 sound/core/pcm_lib.c:204 sound/core/pcm_lib.c:204
snd_pcm_update_hw_ptr0+0xa75/0x1a50 sound/core/pcm_lib.c:465 sound/core/pcm_lib.c:465
snd_pcm_period_elapsed_under_stream_lock+0x15a/0x230 sound/core/pcm_lib.c:1817 sound/core/pcm_lib.c:1817
snd_pcm_period_elapsed+0x28/0x50 sound/core/pcm_lib.c:1849 sound/core/pcm_lib.c:1849
dummy_hrtimer_callback+0x94/0x1b0 sound/drivers/dummy.c:377 sound/drivers/dummy.c:377
__run_hrtimer kernel/time/hrtimer.c:1685 [inline]
__run_hrtimer kernel/time/hrtimer.c:1685 [inline] kernel/time/hrtimer.c:1749
__hrtimer_run_queues+0x609/0xe50 kernel/time/hrtimer.c:1749 kernel/time/hrtimer.c:1749
hrtimer_run_softirq+0x17b/0x360 kernel/time/hrtimer.c:1766 kernel/time/hrtimer.c:1766
__do_softirq+0x29b/0x9c2 kernel/softirq.c:558 kernel/softirq.c:558
invoke_softirq kernel/softirq.c:432 [inline]
invoke_softirq kernel/softirq.c:432 [inline] kernel/softirq.c:637
__irq_exit_rcu+0x123/0x180 kernel/softirq.c:637 kernel/softirq.c:637
irq_exit_rcu+0x5/0x20 kernel/softirq.c:649 kernel/softirq.c:649
sysvec_apic_timer_interrupt+0x93/0xc0 arch/x86/kernel/apic/apic.c:1097 arch/x86/kernel/apic/apic.c:1097
asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:638 arch/x86/include/asm/idtentry.h:638
RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline]
RIP: 0010:__raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:152 [inline] kernel/locking/spinlock.c:194
RIP: 0010:_raw_spin_unlock_irqrestore+0x38/0x70 kernel/locking/spinlock.c:194 kernel/locking/spinlock.c:194
Code: 74 24 10 e8 0a 41 05 f8 48 89 ef e8 52 b7 05 f8 81 e3 00 02 00 00 75 25 9c 58 f6 c4 02 75 2d 48 85 db 74 01 fb bf 01 00 00 00 b3 6e f8 f7 65 8b 05 ec ca aa 76 85 c0 74 0a 5b 5d c3 e8 20 a5
RSP: 0018:ffffc90002d5f920 EFLAGS: 00000206
RAX: 0000000000000002 RBX: 0000000000000200 RCX: 1ffffffff1ffe62e
RDX: 0000000000000000 RSI: 0000000000000002 RDI: 0000000000000001
RBP: ffff888071a9bd20 R08: 0000000000000001 R09: ffffffff8ffa7a0f
R10: 0000000000000001 R11: 0000000000000000 R12: ffff888071a9bd90
R13: 0000000000000001 R14: ffff8880137e0000 R15: ffff888071a9bd20
spin_unlock_irqrestore include/linux/spinlock.h:409 [inline]
spin_unlock_irqrestore include/linux/spinlock.h:409 [inline] fs/io_uring.c:2375
io_req_task_work_add+0x1a2/0x720 fs/io_uring.c:2375 fs/io_uring.c:2375
io_put_req_deferred fs/io_uring.c:2555 [inline]
io_put_req_deferred fs/io_uring.c:2551 [inline]
io_poll_remove_one fs/io_uring.c:5812 [inline]
io_put_req_deferred fs/io_uring.c:2555 [inline] fs/io_uring.c:5800
io_put_req_deferred fs/io_uring.c:2551 [inline] fs/io_uring.c:5800
io_poll_remove_one fs/io_uring.c:5812 [inline] fs/io_uring.c:5800
io_poll_remove_one+0x4bf/0x870 fs/io_uring.c:5800 fs/io_uring.c:5800
io_poll_remove_all+0x198/0x214 fs/io_uring.c:5834 fs/io_uring.c:5834
io_ring_ctx_wait_and_kill+0x1cc/0x322 fs/io_uring.c:9664 fs/io_uring.c:9664
io_uring_release+0x42/0x46 fs/io_uring.c:9684 fs/io_uring.c:9684
__fput+0x286/0x9f0 fs/file_table.c:311 fs/file_table.c:311
task_work_run+0xdd/0x1a0 kernel/task_work.c:164 kernel/task_work.c:164
exit_task_work include/linux/task_work.h:32 [inline]
exit_task_work include/linux/task_work.h:32 [inline] kernel/exit.c:832
do_exit+0xc14/0x2c20 kernel/exit.c:832 kernel/exit.c:832
do_group_exit+0x125/0x310 kernel/exit.c:929 kernel/exit.c:929
get_signal+0x34c/0x28b0 kernel/signal.c:2859 kernel/signal.c:2859
arch_do_signal_or_restart+0x2a9/0x1c40 arch/x86/kernel/signal.c:868 arch/x86/kernel/signal.c:868
handle_signal_work kernel/entry/common.c:148 [inline]
exit_to_user_mode_loop kernel/entry/common.c:172 [inline]
handle_signal_work kernel/entry/common.c:148 [inline] kernel/entry/common.c:207
exit_to_user_mode_loop kernel/entry/common.c:172 [inline] kernel/entry/common.c:207
exit_to_user_mode_prepare+0x17d/0x290 kernel/entry/common.c:207 kernel/entry/common.c:207
__syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline]
__syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline] kernel/entry/common.c:300
syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:300 kernel/entry/common.c:300
do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 arch/x86/entry/common.c:86
entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7fad1cac0ca9
Code: Unable to access opcode bytes at RIP 0x7fad1cac0c7f.
RSP: 002b:00007fad1ca722e8 EFLAGS: 00000246 ORIG_RAX: 00000000000001aa
RAX: 0000000000000100 RBX: 00007fad1cb48428 RCX: 00007fad1cac0ca9
RDX: 0000000000000000 RSI: 0000000000002039 RDI: 0000000000000004
RBP: 00007fad1cb48420 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fad1cb4842c
R13: 00007fad1cb16074 R14: 7073642f7665642f R15: 0000000000000004
----------------
Code disassembly (best guess):
0: 74 24 je 0x26
2: 10 e8 adc %ch,%al
4: 0a 41 05 or 0x5(%rcx),%al
7: f8 clc
8: 48 89 ef mov %rbp,%rdi
b: e8 52 b7 05 f8 callq 0xf805b762
10: 81 e3 00 02 00 00 and $0x200,%ebx
16: 75 25 jne 0x3d
18: 9c pushfq
19: 58 pop %rax
1a: f6 c4 02 test $0x2,%ah
1d: 75 2d jne 0x4c
1f: 48 85 db test %rbx,%rbx
22: 74 01 je 0x25
24: fb sti
25: bf 01 00 00 00 mov $0x1,%edi
* 2a: e8 b3 6e f8 f7 callq 0xf7f86ee2 <-- trapping instruction
2f: 65 8b 05 ec ca aa 76 mov %gs:0x76aacaec(%rip),%eax # 0x76aacb22
36: 85 c0 test %eax,%eax
38: 74 0a je 0x44
3a: 5b pop %rbx
3b: 5d pop %rbp
3c: c3 retq
3d: e8 .byte 0xe8
3e: 20 .byte 0x20
3f: a5 movsl %ds:(%rsi),%es:(%rdi)
----------------
Code disassembly (best guess):
0: 74 24 je 0x26
2: 10 e8 adc %ch,%al
4: 0a 41 05 or 0x5(%rcx),%al
7: f8 clc
8: 48 89 ef mov %rbp,%rdi
b: e8 52 b7 05 f8 callq 0xf805b762
10: 81 e3 00 02 00 00 and $0x200,%ebx
16: 75 25 jne 0x3d
18: 9c pushfq
19: 58 pop %rax
1a: f6 c4 02 test $0x2,%ah
1d: 75 2d jne 0x4c
1f: 48 85 db test %rbx,%rbx
22: 74 01 je 0x25
24: fb sti
25: bf 01 00 00 00 mov $0x1,%edi
* 2a: e8 b3 6e f8 f7 callq 0xf7f86ee2 <-- trapping instruction
2f: 65 8b 05 ec ca aa 76 mov %gs:0x76aacaec(%rip),%eax # 0x76aacb22
36: 85 c0 test %eax,%eax
38: 74 0a je 0x44
3a: 5b pop %rbx
3b: 5d pop %rbp
3c: c3 retq
3d: e8 .byte 0xe8
3e: 20 .byte 0x20
3f: a5 movsl %ds:(%rsi),%es:(%rdi)