============================================
WARNING: possible recursive locking detected
5.19.0-rc6-syzkaller-01417-g2acd1022549e #0 Not tainted
--------------------------------------------
syz-executor.5/3635 is trying to acquire lock:
ffffffff8be0db58 (trace_printk_lock){....}-{2:2}, at: ____bpf_trace_printk kernel/trace/bpf_trace.c:388 [inline]
ffffffff8be0db58 (trace_printk_lock){....}-{2:2}, at: bpf_trace_printk+0xcf/0x170 kernel/trace/bpf_trace.c:374
but task is already holding lock:
ffffffff8be0db58 (trace_printk_lock){....}-{2:2}, at: ____bpf_trace_printk kernel/trace/bpf_trace.c:388 [inline]
ffffffff8be0db58 (trace_printk_lock){....}-{2:2}, at: bpf_trace_printk+0xcf/0x170 kernel/trace/bpf_trace.c:374
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0
----
lock(trace_printk_lock);
lock(trace_printk_lock);
*** DEADLOCK ***
May be due to missing lock nesting notation
3 locks held by syz-executor.5/3635:
#0: ffffffff8bd870a0 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x0/0x340 kernel/trace/./bpf_trace.h:11
#1: ffffffff8be0db58 (trace_printk_lock){....}-{2:2}, at: ____bpf_trace_printk kernel/trace/bpf_trace.c:388 [inline]
#1: ffffffff8be0db58 (trace_printk_lock){....}-{2:2}, at: bpf_trace_printk+0xcf/0x170 kernel/trace/bpf_trace.c:374
#2: ffffffff8bd870a0 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x0/0x340 kernel/trace/./bpf_trace.h:11
stack backtrace:
CPU: 1 PID: 3635 Comm: syz-executor.5 Not tainted 5.19.0-rc6-syzkaller-01417-g2acd1022549e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/29/2022
Call Trace:
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106
print_deadlock_bug kernel/locking/lockdep.c:2988 [inline]
check_deadlock kernel/locking/lockdep.c:3031 [inline]
validate_chain kernel/locking/lockdep.c:3816 [inline]
__lock_acquire.cold+0x1f5/0x3b4 kernel/locking/lockdep.c:5053
lock_acquire kernel/locking/lockdep.c:5665 [inline]
lock_acquire+0x1ab/0x570 kernel/locking/lockdep.c:5630
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0x39/0x50 kernel/locking/spinlock.c:162
____bpf_trace_printk kernel/trace/bpf_trace.c:388 [inline]
bpf_trace_printk+0xcf/0x170 kernel/trace/bpf_trace.c:374
bpf_prog_0605f9f479290f07+0x2f/0x33
bpf_dispatcher_nop_func include/linux/bpf.h:890 [inline]
__bpf_prog_run include/linux/filter.h:594 [inline]
bpf_prog_run include/linux/filter.h:601 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:2046 [inline]
bpf_trace_run2+0x110/0x340 kernel/trace/bpf_trace.c:2083
__bpf_trace_contention_begin+0xb5/0xf0 include/trace/events/lock.h:95
trace_contention_begin.constprop.0+0xda/0x1b0 include/trace/events/lock.h:95
__pv_queued_spin_lock_slowpath+0x103/0xb50 kernel/locking/qspinlock.c:405
pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:591 [inline]
queued_spin_lock_slowpath arch/x86/include/asm/qspinlock.h:51 [inline]
queued_spin_lock include/asm-generic/qspinlock.h:114 [inline]
do_raw_spin_lock+0x200/0x2a0 kernel/locking/spinlock_debug.c:115
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline]
_raw_spin_lock_irqsave+0x41/0x50 kernel/locking/spinlock.c:162
____bpf_trace_printk kernel/trace/bpf_trace.c:388 [inline]
bpf_trace_printk+0xcf/0x170 kernel/trace/bpf_trace.c:374
bpf_prog_0605f9f479290f07+0x2f/0x33
bpf_dispatcher_nop_func include/linux/bpf.h:890 [inline]
__bpf_prog_run include/linux/filter.h:594 [inline]
bpf_prog_run include/linux/filter.h:601 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:2046 [inline]
bpf_trace_run2+0x110/0x340 kernel/trace/bpf_trace.c:2083
__traceiter_sys_exit+0x29/0x40 include/trace/events/syscalls.h:44
trace_sys_exit include/trace/events/syscalls.h:44 [inline]
syscall_exit_work kernel/entry/common.c:245 [inline]
syscall_exit_to_user_mode_prepare+0x18b/0x230 kernel/entry/common.c:276
__syscall_exit_to_user_mode_work kernel/entry/common.c:281 [inline]
syscall_exit_to_user_mode+0x9/0x50 kernel/entry/common.c:294
do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f3ba02adec1
Code: 24 0c 89 3c 24 48 89 4c 24 18 e8 aa e7 ff ff 4c 8b 54 24 18 48 8b 54 24 10 41 89 c0 8b 74 24 0c 8b 3c 24 b8 e6 00 00 00 0f 05 <44> 89 c7 48 89 04 24 e8 e3 e7 ff ff 48 8b 04 24 eb 97 66 2e 0f 1f
RSP: 002b:00007ffff3e3f3e0 EFLAGS: 00000293 ORIG_RAX: 00000000000000e6
RAX: 0000000000000000 RBX: 0000000000002178 RCX: 00007f3ba02adec1
RDX: 00007ffff3e3f420 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 00007ffff3e3f4ac R08: 0000000000000000 R09: 00007ffff3f49080
R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000032
R13: 00000000001ea9db R14: 0000000000000000 R15: 00007ffff3e3f510
------------[ cut here ]------------
WARNING: CPU: 1 PID: 3635 at kernel/bpf/helpers.c:791 try_get_fmt_tmp_buf kernel/bpf/helpers.c:791 [inline]
WARNING: CPU: 1 PID: 3635 at kernel/bpf/helpers.c:791 bpf_bprintf_prepare+0xf31/0x11a0 kernel/bpf/helpers.c:839
Modules linked in:
CPU: 1 PID: 3635 Comm: syz-executor.5 Not tainted 5.19.0-rc6-syzkaller-01417-g2acd1022549e #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/29/2022
RIP: 0010:try_get_fmt_tmp_buf kernel/bpf/helpers.c:791 [inline]
RIP: 0010:bpf_bprintf_prepare+0xf31/0x11a0 kernel/bpf/helpers.c:839
Code: ff e8 43 e6 ea ff 48 83 7c 24 08 00 41 bd 04 00 00 00 0f 85 8a fa ff ff e8 2c e6 ea ff 8d 6b 03 e9 f7 f6 ff ff e8 1f e6 ea ff <0f> 0b 65 ff 0d de b5 73 7e bf 01 00 00 00 41 bc f0 ff ff ff e8 a6
RSP: 0000:ffffc9000316f0b8 EFLAGS: 00010093
RAX: 0000000000000000 RBX: 0000000000000002 RCX: 0000000000000000
RDX: ffff88801b0c0000 RSI: ffffffff818f8b21 RDI: 0000000000000005
RBP: ffffc9000316f1e8 R08: 0000000000000005 R09: 0000000000000003
R10: 0000000000000004 R11: 0000000000000001 R12: 0000000000000003
R13: 0000000000000004 R14: ffffc9000316f2a0 R15: 0000000000000003
FS: 0000555555bd9400(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b2e922000 CR3: 000000004a10d000 CR4: 00000000003506e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
____bpf_trace_printk kernel/trace/bpf_trace.c:383 [inline]
bpf_trace_printk+0xab/0x170 kernel/trace/bpf_trace.c:374
bpf_prog_0605f9f479290f07+0x2f/0x33
bpf_dispatcher_nop_func include/linux/bpf.h:890 [inline]
__bpf_prog_run include/linux/filter.h:594 [inline]
bpf_prog_run include/linux/filter.h:601 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:2046 [inline]
bpf_trace_run2+0x110/0x340 kernel/trace/bpf_trace.c:2083
__bpf_trace_contention_begin+0xb5/0xf0 include/trace/events/lock.h:95
trace_contention_begin.constprop.0+0xda/0x1b0 include/trace/events/lock.h:95
__pv_queued_spin_lock_slowpath+0x103/0xb50 kernel/locking/qspinlock.c:405
pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:591 [inline]
queued_spin_lock_slowpath arch/x86/include/asm/qspinlock.h:51 [inline]
queued_spin_lock include/asm-generic/qspinlock.h:114 [inline]
do_raw_spin_lock+0x200/0x2a0 kernel/locking/spinlock_debug.c:115
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline]
_raw_spin_lock_irqsave+0x41/0x50 kernel/locking/spinlock.c:162
____bpf_trace_printk kernel/trace/bpf_trace.c:388 [inline]
bpf_trace_printk+0xcf/0x170 kernel/trace/bpf_trace.c:374
bpf_prog_0605f9f479290f07+0x2f/0x33
bpf_dispatcher_nop_func include/linux/bpf.h:890 [inline]
__bpf_prog_run include/linux/filter.h:594 [inline]
bpf_prog_run include/linux/filter.h:601 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:2046 [inline]
bpf_trace_run2+0x110/0x340 kernel/trace/bpf_trace.c:2083
__bpf_trace_contention_begin+0xb5/0xf0 include/trace/events/lock.h:95
trace_contention_begin.constprop.0+0xda/0x1b0 include/trace/events/lock.h:95
__pv_queued_spin_lock_slowpath+0x103/0xb50 kernel/locking/qspinlock.c:405
pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:591 [inline]
queued_spin_lock_slowpath arch/x86/include/asm/qspinlock.h:51 [inline]
queued_spin_lock include/asm-generic/qspinlock.h:114 [inline]
do_raw_spin_lock+0x200/0x2a0 kernel/locking/spinlock_debug.c:115
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline]
_raw_spin_lock_irqsave+0x41/0x50 kernel/locking/spinlock.c:162
____bpf_trace_printk kernel/trace/bpf_trace.c:388 [inline]
bpf_trace_printk+0xcf/0x170 kernel/trace/bpf_trace.c:374
bpf_prog_0605f9f479290f07+0x2f/0x33
bpf_dispatcher_nop_func include/linux/bpf.h:890 [inline]
__bpf_prog_run include/linux/filter.h:594 [inline]
bpf_prog_run include/linux/filter.h:601 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:2046 [inline]
bpf_trace_run2+0x110/0x340 kernel/trace/bpf_trace.c:2083
__bpf_trace_contention_begin+0xb5/0xf0 include/trace/events/lock.h:95
trace_contention_begin.constprop.0+0xda/0x1b0 include/trace/events/lock.h:95
__pv_queued_spin_lock_slowpath+0x103/0xb50 kernel/locking/qspinlock.c:405
pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:591 [inline]
queued_spin_lock_slowpath arch/x86/include/asm/qspinlock.h:51 [inline]
queued_spin_lock include/asm-generic/qspinlock.h:114 [inline]
do_raw_spin_lock+0x200/0x2a0 kernel/locking/spinlock_debug.c:115
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline]
_raw_spin_lock_irqsave+0x41/0x50 kernel/locking/spinlock.c:162
____bpf_trace_printk kernel/trace/bpf_trace.c:388 [inline]
bpf_trace_printk+0xcf/0x170 kernel/trace/bpf_trace.c:374
bpf_prog_0605f9f479290f07+0x2f/0x33
bpf_dispatcher_nop_func include/linux/bpf.h:890 [inline]
__bpf_prog_run include/linux/filter.h:594 [inline]
bpf_prog_run include/linux/filter.h:601 [inline]
__bpf_trace_run kernel/trace/bpf_trace.c:2046 [inline]
bpf_trace_run2+0x110/0x340 kernel/trace/bpf_trace.c:2083
__traceiter_sys_exit+0x29/0x40 include/trace/events/syscalls.h:44
trace_sys_exit include/trace/events/syscalls.h:44 [inline]
syscall_exit_work kernel/entry/common.c:245 [inline]
syscall_exit_to_user_mode_prepare+0x18b/0x230 kernel/entry/common.c:276
__syscall_exit_to_user_mode_work kernel/entry/common.c:281 [inline]
syscall_exit_to_user_mode+0x9/0x50 kernel/entry/common.c:294
do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f3ba02adec1
Code: 24 0c 89 3c 24 48 89 4c 24 18 e8 aa e7 ff ff 4c 8b 54 24 18 48 8b 54 24 10 41 89 c0 8b 74 24 0c 8b 3c 24 b8 e6 00 00 00 0f 05 <44> 89 c7 48 89 04 24 e8 e3 e7 ff ff 48 8b 04 24 eb 97 66 2e 0f 1f
RSP: 002b:00007ffff3e3f3e0 EFLAGS: 00000293 ORIG_RAX: 00000000000000e6
RAX: 0000000000000000 RBX: 0000000000002178 RCX: 00007f3ba02adec1
RDX: 00007ffff3e3f420 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 00007ffff3e3f4ac R08: 0000000000000000 R09: 00007ffff3f49080
R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000032
R13: 00000000001ea9db R14: 0000000000000000 R15: 00007ffff3e3f510