============================================ WARNING: possible recursive locking detected 6.1.89-syzkaller #0 Not tainted -------------------------------------------- syz-executor.0/3638 is trying to acquire lock: ffff888057ebd868 (&htab->buckets[i].lock){+.-.}-{2:2}, at: sock_hash_delete_elem+0x177/0x400 net/core/sock_map.c:938 but task is already holding lock: ffff888057ebd868 (&htab->buckets[i].lock){+.-.}-{2:2}, at: sock_hash_delete_from_link net/core/sock_map.c:913 [inline] ffff888057ebd868 (&htab->buckets[i].lock){+.-.}-{2:2}, at: sock_map_unlink net/core/sock_map.c:1556 [inline] ffff888057ebd868 (&htab->buckets[i].lock){+.-.}-{2:2}, at: sock_map_remove_links+0x1c1/0x6b0 net/core/sock_map.c:1568 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-executor.0/3638: #0: ffff888059503210 (&sb->s_type->i_mutex_key#10){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:758 [inline] #0: ffff888059503210 (&sb->s_type->i_mutex_key#10){+.+.}-{3:3}, at: __sock_release net/socket.c:653 [inline] #0: ffff888059503210 (&sb->s_type->i_mutex_key#10){+.+.}-{3:3}, at: sock_close+0x98/0x230 net/socket.c:1400 #1: ffff88807c5ee130 (sk_lock-AF_UNIX){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1745 [inline] #1: ffff88807c5ee130 (sk_lock-AF_UNIX){+.+.}-{0:0}, at: sock_map_close+0x20/0x2d0 net/core/sock_map.c:1624 #2: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline] #2: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline] #2: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: sock_map_close+0x2c/0x2d0 net/core/sock_map.c:1625 #3: ffff888057ebd868 (&htab->buckets[i].lock){+.-.}-{2:2}, at: sock_hash_delete_from_link net/core/sock_map.c:913 [inline] #3: ffff888057ebd868 (&htab->buckets[i].lock){+.-.}-{2:2}, at: sock_map_unlink net/core/sock_map.c:1556 [inline] #3: ffff888057ebd868 (&htab->buckets[i].lock){+.-.}-{2:2}, at: sock_map_remove_links+0x1c1/0x6b0 net/core/sock_map.c:1568 #4: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline] #4: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline] #4: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2272 [inline] #4: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run4+0x16a/0x470 kernel/trace/bpf_trace.c:2314 stack backtrace: CPU: 1 PID: 3638 Comm: syz-executor.0 Not tainted 6.1.89-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/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_bh include/linux/spinlock_api_smp.h:126 [inline] _raw_spin_lock_bh+0x31/0x40 kernel/locking/spinlock.c:178 sock_hash_delete_elem+0x177/0x400 net/core/sock_map.c:938 bpf_prog_bc4ba9860fbb0da4+0x3e/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_run4+0x253/0x470 kernel/trace/bpf_trace.c:2314 __bpf_trace_mm_page_alloc+0xba/0xe0 include/trace/events/kmem.h:177 trace_mm_page_alloc include/trace/events/kmem.h:177 [inline] __alloc_pages+0x717/0x770 mm/page_alloc.c:5569 __stack_depot_save+0x372/0x470 lib/stackdepot.c:474 save_stack+0x104/0x1e0 mm/page_owner.c:128 __set_page_owner+0x26/0x390 mm/page_owner.c:190 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x18d/0x1b0 mm/page_alloc.c:2513 prep_new_page mm/page_alloc.c:2520 [inline] get_page_from_freelist+0x31a1/0x3320 mm/page_alloc.c:4279 __alloc_pages+0x28d/0x770 mm/page_alloc.c:5547 __stack_depot_save+0x372/0x470 lib/stackdepot.c:474 kasan_save_stack mm/kasan/common.c:46 [inline] kasan_set_track+0x60/0x70 mm/kasan/common.c:52 __kasan_slab_alloc+0x65/0x70 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:201 [inline] slab_post_alloc_hook+0x52/0x3a0 mm/slab.h:737 slab_alloc_node mm/slub.c:3398 [inline] slab_alloc mm/slub.c:3406 [inline] __kmem_cache_alloc_lru mm/slub.c:3413 [inline] kmem_cache_alloc+0x10c/0x2d0 mm/slub.c:3422 kmem_cache_zalloc include/linux/slab.h:682 [inline] fill_pool lib/debugobjects.c:168 [inline] debug_objects_fill_pool+0x441/0xa10 lib/debugobjects.c:606 debug_object_activate+0x32/0x4e0 lib/debugobjects.c:693 debug_rcu_head_queue kernel/rcu/rcu.h:189 [inline] kvfree_call_rcu+0xb4/0x8c0 kernel/rcu/tree.c:3391 sock_hash_free_elem net/core/sock_map.c:896 [inline] sock_hash_delete_from_link net/core/sock_map.c:919 [inline] sock_map_unlink net/core/sock_map.c:1556 [inline] sock_map_remove_links+0x5a3/0x6b0 net/core/sock_map.c:1568 sock_map_close+0x118/0x2d0 net/core/sock_map.c:1633 unix_release+0x7e/0xc0 net/unix/af_unix.c:1038 __sock_release net/socket.c:654 [inline] sock_close+0xcd/0x230 net/socket.c:1400 __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:0x7f90d367cd9a 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:00007fffb6589f40 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 RAX: 0000000000000000 RBX: 0000000000000005 RCX: 00007f90d367cd9a RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000004 RBP: 00007f90d37ad980 R08: 0000001b32020000 R09: 000000000000001b R10: 000000008132bc60 R11: 0000000000000293 R12: 000000000000f627 R13: 000000000000f331 R14: 00007fffb658a100 R15: 00007f90d3634cb0