============================================ WARNING: possible recursive locking detected 6.12.0-rc4-syzkaller-00271-g1850ce1bddf2 #0 Not tainted -------------------------------------------- udevd/5213 is trying to acquire lock: ffff88807d4b61e0 (&qs->lock){-.-.}-{2:2}, at: __stack_map_get+0x14b/0x4b0 kernel/bpf/queue_stack_maps.c:140 but task is already holding lock: ffff88806c8ad1e0 (&qs->lock){-.-.}-{2:2}, at: __stack_map_get+0x14b/0x4b0 kernel/bpf/queue_stack_maps.c:140 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&qs->lock); lock(&qs->lock); *** DEADLOCK *** May be due to missing lock nesting notation 4 locks held by udevd/5213: #0: ffff88807b0d9278 (&f->f_pos_lock){+.+.}-{3:3}, at: fdget_pos+0x24e/0x320 fs/file.c:1160 #1: ffffffff8e937e20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline] #1: ffffffff8e937e20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #1: ffffffff8e937e20 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2339 [inline] #1: ffffffff8e937e20 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1fc/0x540 kernel/trace/bpf_trace.c:2381 #2: ffff88806c8ad1e0 (&qs->lock){-.-.}-{2:2}, at: __stack_map_get+0x14b/0x4b0 kernel/bpf/queue_stack_maps.c:140 #3: ffffffff8e937e20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline] #3: ffffffff8e937e20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #3: ffffffff8e937e20 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2339 [inline] #3: ffffffff8e937e20 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1fc/0x540 kernel/trace/bpf_trace.c:2381 stack backtrace: CPU: 0 UID: 0 PID: 5213 Comm: udevd Not tainted 6.12.0-rc4-syzkaller-00271-g1850ce1bddf2 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_deadlock_bug+0x483/0x620 kernel/locking/lockdep.c:3037 check_deadlock kernel/locking/lockdep.c:3089 [inline] validate_chain+0x15e2/0x5920 kernel/locking/lockdep.c:3891 __lock_acquire+0x1384/0x2050 kernel/locking/lockdep.c:5202 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5825 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162 __stack_map_get+0x14b/0x4b0 kernel/bpf/queue_stack_maps.c:140 bpf_prog_9e8ebb70d9ac7f8d+0x45/0x49 bpf_dispatcher_nop_func include/linux/bpf.h:1290 [inline] __bpf_prog_run include/linux/filter.h:701 [inline] bpf_prog_run include/linux/filter.h:708 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2340 [inline] bpf_trace_run2+0x2ec/0x540 kernel/trace/bpf_trace.c:2381 __traceiter_contention_end+0x7b/0xb0 include/trace/events/lock.h:122 trace_contention_end+0x114/0x140 include/trace/events/lock.h:122 __pv_queued_spin_lock_slowpath+0xb7e/0xdb0 kernel/locking/qspinlock.c:557 pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:584 [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+0x272/0x370 kernel/locking/spinlock_debug.c:116 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline] _raw_spin_lock_irqsave+0xe1/0x120 kernel/locking/spinlock.c:162 __stack_map_get+0x14b/0x4b0 kernel/bpf/queue_stack_maps.c:140 bpf_prog_9e8ebb70d9ac7f8d+0x45/0x49 bpf_dispatcher_nop_func include/linux/bpf.h:1290 [inline] __bpf_prog_run include/linux/filter.h:701 [inline] bpf_prog_run include/linux/filter.h:708 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2340 [inline] bpf_trace_run2+0x2ec/0x540 kernel/trace/bpf_trace.c:2381 __traceiter_contention_end+0x7b/0xb0 include/trace/events/lock.h:122 trace_contention_end+0xf5/0x120 include/trace/events/lock.h:122 __mutex_lock_common kernel/locking/mutex.c:617 [inline] __mutex_lock+0x2e5/0xd70 kernel/locking/mutex.c:752 fdget_pos+0x24e/0x320 fs/file.c:1160 __do_sys_getdents64 fs/readdir.c:403 [inline] __se_sys_getdents64+0x1a9/0x4a0 fs/readdir.c:392 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f42cf8f9910 Code: 87 43 04 ff c8 7e 08 48 89 ef e8 4d 0e fc ff 4c 89 e0 5b 5d 41 5c c3 b8 ff ff ff 7f 48 39 c2 48 0f 47 d0 b8 d9 00 00 00 0f 05 <48> 3d 00 f0 ff ff 76 10 48 8b 15 e9 74 0f 00 f7 d8 64 89 02 48 83 RSP: 002b:00007ffeff301b08 EFLAGS: 00000293 ORIG_RAX: 00000000000000d9 RAX: ffffffffffffffda RBX: 000056403a0d64c0 RCX: 00007f42cf8f9910 RDX: 0000000000008000 RSI: 000056403a0d64f0 RDI: 000000000000000d RBP: 000056403a0d64c4 R08: 000056403a0d64c0 R09: 0000000002000000 R10: 0000000000000812 R11: 0000000000000293 R12: 000056403a09a6c0 R13: fffffffffffffe60 R14: 0000000000000002 R15: 000056403a0d64f0