============================================ WARNING: possible recursive locking detected 6.1.91-syzkaller #0 Not tainted -------------------------------------------- syz-executor.1/5901 is trying to acquire lock: ffff88807c076a40 (&stab->lock){+.-.}-{2:2}, at: __sock_map_delete net/core/sock_map.c:419 [inline] ffff88807c076a40 (&stab->lock){+.-.}-{2:2}, at: sock_map_delete_elem+0x161/0x230 net/core/sock_map.c:451 but task is already holding lock: ffff88807dcf1240 (&stab->lock){+.-.}-{2:2}, at: __sock_map_delete net/core/sock_map.c:419 [inline] ffff88807dcf1240 (&stab->lock){+.-.}-{2:2}, at: sock_map_delete_elem+0x161/0x230 net/core/sock_map.c:451 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&stab->lock); lock(&stab->lock); *** DEADLOCK *** May be due to missing lock nesting notation 9 locks held by syz-executor.1/5901: #0: ffff88807e48e460 (sb_writers#4){.+.+}-{0:0}, at: mnt_want_write+0x3b/0x80 fs/namespace.c:393 #1: ffff888071347258 (&type->i_mutex_dir_key#3/1){+.+.}-{3:3}, at: inode_lock_nested include/linux/fs.h:793 [inline] #1: ffff888071347258 (&type->i_mutex_dir_key#3/1){+.+.}-{3:3}, at: do_rmdir+0x251/0x590 fs/namei.c:4241 #2: ffff88807e48e650 (sb_internal){.+.+}-{0:0}, at: __sb_start_write include/linux/fs.h:1891 [inline] #2: ffff88807e48e650 (sb_internal){.+.+}-{0:0}, at: sb_start_intwrite include/linux/fs.h:2013 [inline] #2: ffff88807e48e650 (sb_internal){.+.+}-{0:0}, at: ext4_evict_inode+0x46d/0x1150 fs/ext4/inode.c:240 #3: ffff88807e492990 (jbd2_handle){++++}-{0:0}, at: start_this_handle+0x1f51/0x21b0 fs/jbd2/transaction.c:463 #4: ffff888059b1d2c8 (&ei->i_data_sem){++++}-{3:3}, at: ext4_truncate+0x999/0x1290 fs/ext4/inode.c:4272 #5: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline] #5: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline] #5: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2272 [inline] #5: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run6+0x1b5/0x4b0 kernel/trace/bpf_trace.c:2316 #6: ffff88807dcf1240 (&stab->lock){+.-.}-{2:2}, at: __sock_map_delete net/core/sock_map.c:419 [inline] #6: ffff88807dcf1240 (&stab->lock){+.-.}-{2:2}, at: sock_map_delete_elem+0x161/0x230 net/core/sock_map.c:451 #7: ffff888057c5b290 (&psock->link_lock){+...}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:356 [inline] #7: ffff888057c5b290 (&psock->link_lock){+...}-{2:2}, at: sock_map_del_link net/core/sock_map.c:147 [inline] #7: ffff888057c5b290 (&psock->link_lock){+...}-{2:2}, at: sock_map_unref+0xcc/0x5d0 net/core/sock_map.c:182 #8: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline] #8: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline] #8: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2272 [inline] #8: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x110/0x410 kernel/trace/bpf_trace.c:2312 stack backtrace: CPU: 1 PID: 5901 Comm: syz-executor.1 Not tainted 6.1.91-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/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_map_delete net/core/sock_map.c:419 [inline] sock_map_delete_elem+0x161/0x230 net/core/sock_map.c:451 bpf_prog_2c29ac5cdc6b1842+0x3a/0x3e 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_run2+0x1fd/0x410 kernel/trace/bpf_trace.c:2312 __bpf_trace_kfree+0x6e/0x90 include/trace/events/kmem.h:94 trace_kfree include/trace/events/kmem.h:94 [inline] kfree+0xf6/0x190 mm/slab_common.c:994 sk_psock_free_link include/linux/skmsg.h:416 [inline] sock_map_del_link net/core/sock_map.c:160 [inline] sock_map_unref+0x3ac/0x5d0 net/core/sock_map.c:182 __sock_map_delete net/core/sock_map.c:425 [inline] sock_map_delete_elem+0x191/0x230 net/core/sock_map.c:451 bpf_prog_8a405b5ced52e191+0x42/0x46 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_run6+0x29e/0x4b0 kernel/trace/bpf_trace.c:2316 __bpf_trace_ext4_ext_remove_space_done+0x3f/0x50 include/trace/events/ext4.h:2089 trace_ext4_ext_remove_space_done include/trace/events/ext4.h:2089 [inline] ext4_ext_remove_space+0x4cc3/0x4f30 fs/ext4/extents.c:3008 ext4_ext_truncate+0x201/0x360 fs/ext4/extents.c:4446 ext4_truncate+0xa1d/0x1290 fs/ext4/inode.c:4277 ext4_evict_inode+0xb68/0x1150 fs/ext4/inode.c:286 evict+0x2a4/0x620 fs/inode.c:666 d_delete_notify include/linux/fsnotify.h:261 [inline] vfs_rmdir+0x381/0x4b0 fs/namei.c:4206 do_rmdir+0x3a2/0x590 fs/namei.c:4254 __do_sys_unlinkat fs/namei.c:4434 [inline] __se_sys_unlinkat fs/namei.c:4428 [inline] __x64_sys_unlinkat+0xdc/0xf0 fs/namei.c:4428 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:81 entry_SYSCALL_64_after_hwframe+0x68/0xd2 RIP: 0033:0x7fef3107c6c7 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 07 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:00007ffdf294e2e8 EFLAGS: 00000207 ORIG_RAX: 0000000000000107 RAX: ffffffffffffffda RBX: 0000000000000065 RCX: 00007fef3107c6c7 RDX: 0000000000000200 RSI: 00007ffdf294f460 RDI: 00000000ffffff9c RBP: 00007fef310c8336 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000100 R11: 0000000000000207 R12: 00007ffdf294f460 R13: 00007fef310c8336 R14: 000000000004ec4c R15: 000000000000000c