============================================ WARNING: possible recursive locking detected 5.19.0-syzkaller-11908-g7ebfc85e2cd7 #0 Not tainted -------------------------------------------- syz-executor.0/16964 is trying to acquire lock: ffffffff8c0110b8 (trace_printk_lock){-.-.}-{2:2}, at: ____bpf_trace_printk kernel/trace/bpf_trace.c:388 [inline] ffffffff8c0110b8 (trace_printk_lock){-.-.}-{2:2}, at: bpf_trace_printk+0xcf/0x170 kernel/trace/bpf_trace.c:374 but task is already holding lock: ffffffff8c0110b8 (trace_printk_lock){-.-.}-{2:2}, at: ____bpf_trace_printk kernel/trace/bpf_trace.c:388 [inline] ffffffff8c0110b8 (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.0/16964: #0: ffffffff8bf89240 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run1+0x0/0x330 kernel/trace/./bpf_trace.h:11 #1: ffffffff8c0110b8 (trace_printk_lock){-.-.}-{2:2}, at: ____bpf_trace_printk kernel/trace/bpf_trace.c:388 [inline] #1: ffffffff8c0110b8 (trace_printk_lock){-.-.}-{2:2}, at: bpf_trace_printk+0xcf/0x170 kernel/trace/bpf_trace.c:374 #2: ffffffff8bf89240 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x0/0x340 kernel/trace/./bpf_trace.h:11 stack backtrace: CPU: 1 PID: 16964 Comm: syz-executor.0 Not tainted 5.19.0-syzkaller-11908-g7ebfc85e2cd7 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/22/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+0x116/0x3a7 kernel/locking/lockdep.c:5053 lock_acquire kernel/locking/lockdep.c:5666 [inline] lock_acquire+0x1ab/0x570 kernel/locking/lockdep.c:5631 __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:903 [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:903 [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_run1+0x108/0x330 kernel/trace/bpf_trace.c:2082 __bpf_trace_rcu_utilization+0x81/0xb0 include/trace/events/rcu.h:27 __traceiter_rcu_utilization+0x4e/0x90 include/trace/events/rcu.h:27 trace_rcu_utilization+0xd5/0x1b0 include/trace/events/rcu.h:27 rcu_note_context_switch+0x6f/0x1850 kernel/rcu/tree_plugin.h:316 __schedule+0x273/0x52b0 kernel/sched/core.c:6394 preempt_schedule_irq+0x4e/0x90 kernel/sched/core.c:6806 irqentry_exit+0x31/0x80 kernel/entry/common.c:428 asm_sysvec_apic_timer_interrupt+0x16/0x20 arch/x86/include/asm/idtentry.h:649 RIP: 0010:preempt_count arch/x86/include/asm/preempt.h:27 [inline] RIP: 0010:check_kcov_mode kernel/kcov.c:166 [inline] RIP: 0010:__sanitizer_cov_trace_pc+0x0/0x60 kernel/kcov.c:200 Code: 48 89 ef 5d e9 f1 b5 4b 00 5d be 03 00 00 00 e9 86 04 81 02 66 0f 1f 44 00 00 48 8b be a8 01 00 00 e8 b4 ff ff ff 31 c0 c3 90 <65> 8b 05 29 68 86 7e 89 c1 48 8b 34 24 81 e1 00 01 00 00 65 48 8b RSP: 0018:ffffc9000af1f618 EFLAGS: 00000246 RAX: 0000000000000002 RBX: dffffc0000000000 RCX: ffffffff818f71d8 RDX: ffff888049ebd880 RSI: 0000000000000000 RDI: 0000000000000001 RBP: ffffc9000af1f8a0 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 R13: ffff88807cf98000 R14: ffff88807e0c2368 R15: 0000000000000003 sanitize_mark_insn_seen kernel/bpf/verifier.c:7950 [inline] do_check kernel/bpf/verifier.c:12154 [inline] do_check_common+0x2826/0xcbc0 kernel/bpf/verifier.c:14611 do_check_main kernel/bpf/verifier.c:14674 [inline] bpf_check+0x86f3/0xb8e0 kernel/bpf/verifier.c:15244 bpf_prog_load+0x13cb/0x2230 kernel/bpf/syscall.c:2595 __sys_bpf+0x1e7e/0x6130 kernel/bpf/syscall.c:4953 __do_sys_bpf kernel/bpf/syscall.c:5057 [inline] __se_sys_bpf kernel/bpf/syscall.c:5055 [inline] __x64_sys_bpf+0x75/0xb0 kernel/bpf/syscall.c:5055 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7fa63c689279 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fa63d86d168 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 00007fa63c79bf80 RCX: 00007fa63c689279 RDX: 0000000000000078 RSI: 0000000020000300 RDI: 0000000000000005 RBP: 00007fa63c6e3189 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffe448b87af R14: 00007fa63d86d300 R15: 0000000000022000 ---------------- Code disassembly (best guess): 0: 48 89 ef mov %rbp,%rdi 3: 5d pop %rbp 4: e9 f1 b5 4b 00 jmpq 0x4bb5fa 9: 5d pop %rbp a: be 03 00 00 00 mov $0x3,%esi f: e9 86 04 81 02 jmpq 0x281049a 14: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 1a: 48 8b be a8 01 00 00 mov 0x1a8(%rsi),%rdi 21: e8 b4 ff ff ff callq 0xffffffda 26: 31 c0 xor %eax,%eax 28: c3 retq 29: 90 nop * 2a: 65 8b 05 29 68 86 7e mov %gs:0x7e866829(%rip),%eax # 0x7e86685a <-- trapping instruction 31: 89 c1 mov %eax,%ecx 33: 48 8b 34 24 mov (%rsp),%rsi 37: 81 e1 00 01 00 00 and $0x100,%ecx 3d: 65 gs 3e: 48 rex.W 3f: 8b .byte 0x8b