============================================ WARNING: possible recursive locking detected 6.1.90-syzkaller #0 Not tainted -------------------------------------------- syz-executor.3/7493 is trying to acquire lock: ffffc90010d390d8 (&rb->spinlock){....}-{2:2}, at: __bpf_ringbuf_reserve+0x20d/0x4f0 kernel/bpf/ringbuf.c:410 but task is already holding lock: ffffc90010de10d8 (&rb->spinlock){....}-{2:2}, at: __bpf_ringbuf_reserve+0x20d/0x4f0 kernel/bpf/ringbuf.c:410 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&rb->spinlock); lock(&rb->spinlock); *** DEADLOCK *** May be due to missing lock nesting notation 8 locks held by syz-executor.3/7493: #0: ffffffff8d17f488 (event_mutex){+.+.}-{3:3}, at: perf_trace_destroy+0x2a/0x140 kernel/trace/trace_event_perf.c:239 #1: ffffffff8d1716e8 (tracepoints_mutex){+.+.}-{3:3}, at: tracepoint_probe_unregister+0x2e/0x980 kernel/tracepoint.c:548 #2: ffffffff8cfc8070 (cpu_hotplug_lock){++++}-{0:0}, at: static_key_disable+0xe/0x20 kernel/jump_label.c:214 #3: ffffffff8d1c7308 (jump_label_mutex){+.+.}-{3:3}, at: jump_label_lock kernel/jump_label.c:27 [inline] #3: ffffffff8d1c7308 (jump_label_mutex){+.+.}-{3:3}, at: static_key_disable_cpuslocked+0x97/0x1b0 kernel/jump_label.c:205 #4: ffffffff8cfdcf68 (text_mutex){+.+.}-{3:3}, at: arch_jump_label_transform_queue+0x40/0xd0 arch/x86/kernel/jump_label.c:136 #5: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline] #5: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline] #5: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2272 [inline] #5: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x110/0x410 kernel/trace/bpf_trace.c:2312 #6: ffffc90010de10d8 (&rb->spinlock){....}-{2:2}, at: __bpf_ringbuf_reserve+0x20d/0x4f0 kernel/bpf/ringbuf.c:410 #7: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline] #7: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline] #7: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2272 [inline] #7: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x110/0x410 kernel/trace/bpf_trace.c:2312 stack backtrace: CPU: 1 PID: 7493 Comm: syz-executor.3 Not tainted 6.1.90-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/02/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106 print_deadlock_bug kernel/locking/lockdep.c:2983 [inline] check_deadlock kernel/locking/lockdep.c:3026 [inline] validate_chain+0x4711/0x5950 kernel/locking/lockdep.c:3812 __lock_acquire+0x125b/0x1f80 kernel/locking/lockdep.c:5049 lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5662 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd1/0x120 kernel/locking/spinlock.c:162 __bpf_ringbuf_reserve+0x20d/0x4f0 kernel/bpf/ringbuf.c:410 ____bpf_ringbuf_reserve kernel/bpf/ringbuf.c:445 [inline] bpf_ringbuf_reserve+0x58/0x70 kernel/bpf/ringbuf.c:437 bpf_prog_8c296d0debb99b26+0x25/0x42 bpf_dispatcher_nop_func include/linux/bpf.h:989 [inline] __bpf_prog_run include/linux/filter.h:603 [inline] bpf_prog_run include/linux/filter.h:610 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2273 [inline] bpf_trace_run2+0x1fd/0x410 kernel/trace/bpf_trace.c:2312 __traceiter_contention_end+0x74/0xa0 include/trace/events/lock.h:122 trace_contention_end+0x14c/0x190 include/trace/events/lock.h:122 __pv_queued_spin_lock_slowpath+0x935/0xc50 kernel/locking/qspinlock.c:560 pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:591 [inline] queued_spin_lock_slowpath+0x42/0x50 arch/x86/include/asm/qspinlock.h:51 queued_spin_lock include/asm-generic/qspinlock.h:114 [inline] do_raw_spin_lock+0x269/0x370 kernel/locking/spinlock_debug.c:115 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline] _raw_spin_lock_irqsave+0xdd/0x120 kernel/locking/spinlock.c:162 __bpf_ringbuf_reserve+0x20d/0x4f0 kernel/bpf/ringbuf.c:410 ____bpf_ringbuf_reserve kernel/bpf/ringbuf.c:445 [inline] bpf_ringbuf_reserve+0x58/0x70 kernel/bpf/ringbuf.c:437 bpf_prog_8c296d0debb99b26+0x25/0x42 bpf_dispatcher_nop_func include/linux/bpf.h:989 [inline] __bpf_prog_run include/linux/filter.h:603 [inline] bpf_prog_run include/linux/filter.h:610 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2273 [inline] bpf_trace_run2+0x1fd/0x410 kernel/trace/bpf_trace.c:2312 __traceiter_contention_end+0x74/0xa0 include/trace/events/lock.h:122 trace_contention_end+0x12f/0x170 include/trace/events/lock.h:122 __mutex_lock_common kernel/locking/mutex.c:612 [inline] __mutex_lock+0x2ed/0xd80 kernel/locking/mutex.c:747 arch_jump_label_transform_queue+0x40/0xd0 arch/x86/kernel/jump_label.c:136 __jump_label_update+0x177/0x3a0 kernel/jump_label.c:447 static_key_disable_cpuslocked+0xca/0x1b0 kernel/jump_label.c:207 static_key_disable+0x16/0x20 kernel/jump_label.c:215 tracepoint_remove_func kernel/tracepoint.c:417 [inline] tracepoint_probe_unregister+0x6e6/0x980 kernel/tracepoint.c:551 trace_event_reg+0x216/0x250 perf_trace_event_unreg+0xb0/0x1a0 kernel/trace/trace_event_perf.c:162 perf_trace_destroy+0x98/0x140 kernel/trace/trace_event_perf.c:241 _free_event+0x891/0xe60 kernel/events/core.c:5043 put_event kernel/events/core.c:5137 [inline] perf_event_release_kernel+0x7f2/0x870 kernel/events/core.c:5249 perf_release+0x37/0x40 kernel/events/core.c:5259 __fput+0x3b7/0x890 fs/file_table.c:320 task_work_run+0x246/0x300 kernel/task_work.c:179 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0xde/0x100 kernel/entry/common.c:177 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:210 __syscall_exit_to_user_mode_work kernel/entry/common.c:292 [inline] syscall_exit_to_user_mode+0x60/0x270 kernel/entry/common.c:303 do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:87 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7f7cf4a7cc5a Code: 48 3d 00 f0 ff ff 77 48 c3 0f 1f 80 00 00 00 00 48 83 ec 18 89 7c 24 0c e8 03 7f 02 00 8b 7c 24 0c 89 c2 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 36 89 d7 89 44 24 0c e8 63 7f 02 00 8b 44 24 RSP: 002b:00007ffe90eb9b80 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000005 RCX: 00007f7cf4a7cc5a RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004 RBP: 00007f7cf4bad980 R08: 0000001b30620000 R09: 0000000000000257 R10: 00000000887a5afa R11: 0000000000000293 R12: 0000000000033a3c R13: 00007f7cf4bac05c R14: 00007f7cf4bac050 R15: 0000000000000032