============================================ WARNING: possible recursive locking detected 6.9.0-rc6-syzkaller-01554-g252aa6d53931 #0 Not tainted -------------------------------------------- syz-executor199/5094 is trying to acquire lock: ffff88801fe79820 (&htab->buckets[i].lock){+...}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:356 [inline] ffff88801fe79820 (&htab->buckets[i].lock){+...}-{2:2}, at: sock_hash_delete_elem+0x17c/0x400 net/core/sock_map.c:957 but task is already holding lock: ffff8880790be020 (&htab->buckets[i].lock){+...}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:356 [inline] ffff8880790be020 (&htab->buckets[i].lock){+...}-{2:2}, at: sock_hash_delete_elem+0x17c/0x400 net/core/sock_map.c:957 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&htab->buckets[i].lock); lock(&htab->buckets[i].lock); *** DEADLOCK *** May be due to missing lock nesting notation 4 locks held by syz-executor199/5094: #0: ffffffff8e334ea0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #0: ffffffff8e334ea0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #0: ffffffff8e334ea0 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2391 [inline] #0: ffffffff8e334ea0 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1fc/0x540 kernel/trace/bpf_trace.c:2433 #1: ffff8880790be020 (&htab->buckets[i].lock){+...}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:356 [inline] #1: ffff8880790be020 (&htab->buckets[i].lock){+...}-{2:2}, at: sock_hash_delete_elem+0x17c/0x400 net/core/sock_map.c:957 #2: ffff88801b6ce2b0 (&psock->link_lock){+...}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:356 [inline] #2: ffff88801b6ce2b0 (&psock->link_lock){+...}-{2:2}, at: sock_map_del_link net/core/sock_map.c:157 [inline] #2: ffff88801b6ce2b0 (&psock->link_lock){+...}-{2:2}, at: sock_map_unref+0xcc/0x5e0 net/core/sock_map.c:192 #3: ffffffff8e334ea0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #3: ffffffff8e334ea0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #3: ffffffff8e334ea0 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2391 [inline] #3: ffffffff8e334ea0 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x1fc/0x540 kernel/trace/bpf_trace.c:2433 stack backtrace: CPU: 1 PID: 5094 Comm: syz-executor199 Not tainted 6.9.0-rc6-syzkaller-01554-g252aa6d53931 #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+0x241/0x360 lib/dump_stack.c:114 check_deadlock kernel/locking/lockdep.c:3062 [inline] validate_chain+0x15c1/0x58e0 kernel/locking/lockdep.c:3856 __lock_acquire+0x1346/0x1fd0 kernel/locking/lockdep.c:5137 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5754 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:126 [inline] _raw_spin_lock_bh+0x35/0x50 kernel/locking/spinlock.c:178 spin_lock_bh include/linux/spinlock.h:356 [inline] sock_hash_delete_elem+0x17c/0x400 net/core/sock_map.c:957 bpf_prog_3ffd2c70e20892c6+0x42/0x4b bpf_dispatcher_nop_func include/linux/bpf.h:1243 [inline] __bpf_prog_run include/linux/filter.h:691 [inline] bpf_prog_run include/linux/filter.h:698 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2392 [inline] bpf_trace_run2+0x2ec/0x540 kernel/trace/bpf_trace.c:2433 __traceiter_kfree+0x2b/0x50 include/trace/events/kmem.h:94 trace_kfree include/trace/events/kmem.h:94 [inline] kfree+0x2af/0x3a0 mm/slub.c:4377 sk_psock_free_link include/linux/skmsg.h:425 [inline] sock_map_del_link net/core/sock_map.c:170 [inline] sock_map_unref+0x3ac/0x5e0 net/core/sock_map.c:192 sock_hash_delete_elem+0x392/0x400 net/core/sock_map.c:961 bpf_prog_3ffd2c70e20892c6+0x42/0x4b bpf_dispatcher_nop_func include/linux/bpf.h:1243 [inline] __bpf_prog_run include/linux/filter.h:691 [inline] bpf_prog_run include/linux/filter.h:698 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2392 [inline] bpf_trace_run2+0x2ec/0x540 kernel/trace/bpf_trace.c:2433 __traceiter_kfree+0x2b/0x50 include/trace/events/kmem.h:94 trace_kfree include/trace/events/kmem.h:94 [inline] kfree+0x2af/0x3a0 mm/slub.c:4377 map_update_elem+0x5ca/0x6f0 kernel/bpf/syscall.c:1658 __sys_bpf+0x76f/0x810 kernel/bpf/syscall.c:5665 __do_sys_bpf kernel/bpf/syscall.c:5784 [inline] __se_sys_bpf kernel/bpf/syscall.c:5782 [inline] __x64_sys_bpf+0x7c/0x90 kernel/bpf/syscall.c:5782 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf5/0x240 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fcf41d49d69 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 c1 17 00 00 90 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:00007fff5386b958 EFLAGS: 00000246 ORIG_RAX: 0000000000000141 RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fcf41d49d69 RDX: 0000000000000020 RSI: 0000000020000c80 RDI: 0000000000000002 RBP: 0000000000000000 R08: 00000000000000a0 R09: 00000000000000a0 R10: 00000000000000a0 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000