============================================ WARNING: possible recursive locking detected 6.9.0-rc5-syzkaller-01511-g20a759df3bba #0 Not tainted -------------------------------------------- syz-executor108/5098 is trying to acquire lock: ffff88801a2c0468 (&htab->buckets[i].lock){+.-.}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:356 [inline] ffff88801a2c0468 (&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: ffff88801a2c0368 (&htab->buckets[i].lock){+.-.}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:356 [inline] ffff88801a2c0368 (&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 5 locks held by syz-executor108/5098: #0: ffff8880223b2808 (&vma->vm_lock->lock){++++}-{3:3}, at: vma_start_read include/linux/mm.h:677 [inline] #0: ffff8880223b2808 (&vma->vm_lock->lock){++++}-{3:3}, at: lock_vma_under_rcu+0x2f9/0x730 mm/memory.c:5762 #1: ffffffff8e334e20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #1: ffffffff8e334e20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #1: ffffffff8e334e20 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2402 [inline] #1: ffffffff8e334e20 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run4+0x244/0x590 kernel/trace/bpf_trace.c:2446 #2: ffff88801a2c0368 (&htab->buckets[i].lock){+.-.}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:356 [inline] #2: ffff88801a2c0368 (&htab->buckets[i].lock){+.-.}-{2:2}, at: sock_hash_delete_elem+0x17c/0x400 net/core/sock_map.c:957 #3: ffff888076c1a2b0 (&psock->link_lock){+.-.}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:356 [inline] #3: ffff888076c1a2b0 (&psock->link_lock){+.-.}-{2:2}, at: sock_map_del_link net/core/sock_map.c:157 [inline] #3: ffff888076c1a2b0 (&psock->link_lock){+.-.}-{2:2}, at: sock_map_unref+0xcc/0x5e0 net/core/sock_map.c:192 #4: ffffffff8e334e20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:329 [inline] #4: ffffffff8e334e20 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:781 [inline] #4: ffffffff8e334e20 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2402 [inline] #4: ffffffff8e334e20 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run4+0x244/0x590 kernel/trace/bpf_trace.c:2446 stack backtrace: CPU: 1 PID: 5098 Comm: syz-executor108 Not tainted 6.9.0-rc5-syzkaller-01511-g20a759df3bba #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_a8aaa52f2e199321+0x4a/0x4e 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:2403 [inline] bpf_trace_run4+0x334/0x590 kernel/trace/bpf_trace.c:2446 __traceiter_mm_page_alloc+0x3a/0x60 include/trace/events/kmem.h:177 trace_mm_page_alloc include/trace/events/kmem.h:177 [inline] __alloc_pages+0x694/0x6c0 mm/page_alloc.c:4597 alloc_pages_mpol+0x3e8/0x680 mm/mempolicy.c:2264 stack_depot_save_flags+0x666/0x830 lib/stackdepot.c:635 save_stack+0x109/0x1f0 mm/page_owner.c:157 __set_page_owner+0x8d/0x810 mm/page_owner.c:325 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1ea/0x210 mm/page_alloc.c:1534 prep_new_page mm/page_alloc.c:1541 [inline] get_page_from_freelist+0x3410/0x35b0 mm/page_alloc.c:3317 __alloc_pages+0x256/0x6c0 mm/page_alloc.c:4575 alloc_pages_mpol+0x3e8/0x680 mm/mempolicy.c:2264 stack_depot_save_flags+0x666/0x830 lib/stackdepot.c:635 kasan_save_stack mm/kasan/common.c:48 [inline] kasan_save_track+0x51/0x80 mm/kasan/common.c:68 kasan_save_free_info+0x40/0x50 mm/kasan/generic.c:579 poison_slab_object+0xa6/0xe0 mm/kasan/common.c:240 __kasan_slab_free+0x37/0x60 mm/kasan/common.c:256 kasan_slab_free include/linux/kasan.h:184 [inline] slab_free_hook mm/slub.c:2106 [inline] slab_free mm/slub.c:4280 [inline] kfree+0x153/0x3a0 mm/slub.c:4390 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_a8aaa52f2e199321+0x4a/0x4e 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:2403 [inline] bpf_trace_run4+0x334/0x590 kernel/trace/bpf_trace.c:2446 __traceiter_mm_page_alloc+0x3a/0x60 include/trace/events/kmem.h:177 trace_mm_page_alloc include/trace/events/kmem.h:177 [inline] __alloc_pages+0x694/0x6c0 mm/page_alloc.c:4597 alloc_pages_mpol+0x3e8/0x680 mm/mempolicy.c:2264 vma_alloc_folio+0xf3/0x1f0 mm/mempolicy.c:2303 folio_prealloc+0x31/0x170 wp_page_copy mm/memory.c:3263 [inline] do_wp_page+0x11bd/0x4fd0 mm/memory.c:3660 handle_pte_fault mm/memory.c:5316 [inline] __handle_mm_fault+0x264a/0x7240 mm/memory.c:5441 handle_mm_fault+0x3c2/0x8a0 mm/memory.c:5606 do_user_addr_fault arch/x86/mm/fault.c:1362 [inline] handle_page_fault arch/x86/mm/fault.c:1505 [inline] exc_page_fault+0x446/0x8e0 arch/x86/mm/fault.c:1563 asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:623 RIP: 0033:0x7f28e41c97a9 Code: c9 31 c0 41 b8 00 00 00 20 ba 02 00 00 00 be 01 00 00 00 bf 35 00 00 00 e8 f4 15 03 00 48 83 c0 01 74 0e 8b 04 25 00 00 00 20 <48> 89 05 20 89 0a 00 31 c0 45 31 ff 66 0f ef c0 31 f6 89 04 25 d8 RSP: 002b:00007ffff6483ba0 EFLAGS: 00010202 RAX: 0000000000000003 RBX: 0000000000000000 RCX: 00007f28e41fada9 RDX: 0000000000000000 RSI: 0000000000000002 RDI: 0000000000000001 RBP: 00000000000f4240 R08: 0000000000000000 R09: 00000000000000a0 R10: 0000000020000000 R11: 0000000000000246 R12: 000000000000eb70 R13: 00007ffff6483bac R14: 00007ffff6483bc0 R15: 00007ffff6483bb0