============================================ WARNING: possible recursive locking detected 5.15.158-syzkaller #0 Not tainted -------------------------------------------- syz-executor.3/19137 is trying to acquire lock: ffff8880641e5368 (&htab->buckets[i].lock){+...}-{2:2}, at: sock_hash_delete_elem+0x177/0x400 net/core/sock_map.c:943 but task is already holding lock: ffff8880641e5368 (&htab->buckets[i].lock){+...}-{2:2}, at: sock_hash_delete_elem+0x177/0x400 net/core/sock_map.c:943 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 6 locks held by syz-executor.3/19137: #0: ffff88814b05e460 (sb_writers#5){.+.+}-{0:0}, at: mnt_want_write+0x3b/0x80 fs/namespace.c:377 #1: ffff88805b1c53b0 (&type->i_mutex_dir_key#4/1){+.+.}-{3:3}, at: inode_lock_nested include/linux/fs.h:824 [inline] #1: ffff88805b1c53b0 (&type->i_mutex_dir_key#4/1){+.+.}-{3:3}, at: filename_create+0x25c/0x530 fs/namei.c:3835 #2: ffffffff8c91fae0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x5/0x30 include/linux/rcupdate.h:311 #3: ffff8880641e5368 (&htab->buckets[i].lock){+...}-{2:2}, at: sock_hash_delete_elem+0x177/0x400 net/core/sock_map.c:943 #4: ffff88801b8eb290 (&psock->link_lock){+...}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:368 [inline] #4: ffff88801b8eb290 (&psock->link_lock){+...}-{2:2}, at: sock_map_del_link net/core/sock_map.c:147 [inline] #4: ffff88801b8eb290 (&psock->link_lock){+...}-{2:2}, at: sock_map_unref+0xcc/0x5d0 net/core/sock_map.c:182 #5: ffffffff8c91fae0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x5/0x30 include/linux/rcupdate.h:311 stack backtrace: CPU: 1 PID: 19137 Comm: syz-executor.3 Not tainted 5.15.158-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/0x2d0 lib/dump_stack.c:106 print_deadlock_bug kernel/locking/lockdep.c:2946 [inline] check_deadlock kernel/locking/lockdep.c:2989 [inline] validate_chain+0x46d2/0x5930 kernel/locking/lockdep.c:3775 __lock_acquire+0x1295/0x1ff0 kernel/locking/lockdep.c:5012 lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:135 [inline] _raw_spin_lock_bh+0x31/0x40 kernel/locking/spinlock.c:178 sock_hash_delete_elem+0x177/0x400 net/core/sock_map.c:943 bpf_prog_2c29ac5cdc6b1842+0x3a/0x5e8 bpf_dispatcher_nop_func include/linux/bpf.h:790 [inline] __bpf_prog_run include/linux/filter.h:628 [inline] bpf_prog_run include/linux/filter.h:635 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:1880 [inline] bpf_trace_run2+0x19e/0x340 kernel/trace/bpf_trace.c:1917 __bpf_trace_kfree+0x6e/0x90 include/trace/events/kmem.h:118 trace_kfree include/trace/events/kmem.h:118 [inline] kfree+0x22f/0x270 mm/slub.c:4549 sk_psock_free_link include/linux/skmsg.h:422 [inline] sock_map_del_link net/core/sock_map.c:160 [inline] sock_map_unref+0x3ac/0x5d0 net/core/sock_map.c:182 sock_hash_delete_elem+0x388/0x400 net/core/sock_map.c:947 bpf_prog_2c29ac5cdc6b1842+0x3a/0x5e8 bpf_dispatcher_nop_func include/linux/bpf.h:790 [inline] __bpf_prog_run include/linux/filter.h:628 [inline] bpf_prog_run include/linux/filter.h:635 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:1880 [inline] bpf_trace_run2+0x19e/0x340 kernel/trace/bpf_trace.c:1917 __bpf_trace_kfree+0x6e/0x90 include/trace/events/kmem.h:118 trace_kfree include/trace/events/kmem.h:118 [inline] kfree+0x22f/0x270 mm/slub.c:4549 fscrypt_free_filename include/linux/fscrypt.h:316 [inline] ext4_fname_free_filename fs/ext4/ext4.h:2784 [inline] ext4_lookup_entry fs/ext4/namei.c:1773 [inline] ext4_lookup+0x3f3/0xaa0 fs/ext4/namei.c:1839 lookup_one_qstr_excl+0x117/0x240 fs/namei.c:1563 filename_create+0x293/0x530 fs/namei.c:3836 do_symlinkat+0xf6/0x600 fs/namei.c:4448 __do_sys_symlinkat fs/namei.c:4475 [inline] __se_sys_symlinkat fs/namei.c:4472 [inline] __x64_sys_symlinkat+0x95/0xa0 fs/namei.c:4472 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7fdf5310a4e7 Code: 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 0a 01 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fffa6fd2968 EFLAGS: 00000202 ORIG_RAX: 000000000000010a RAX: ffffffffffffffda RBX: 00007fffa6fd2a30 RCX: 00007fdf5310a4e7 RDX: 00007fdf53157560 RSI: 00000000ffffff9c RDI: 00007fffa6fd2a30 RBP: 0000000000000001 R08: 0000000000000013 R09: 00007fffa6fd26b7 R10: 0000000000000000 R11: 0000000000000202 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000001 R15: 0000000000000001