============================================ WARNING: possible recursive locking detected 6.1.91-syzkaller #0 Not tainted -------------------------------------------- syz-executor.2/3713 is trying to acquire lock: ffff888023235a40 (&stab->lock){+.-.}-{2:2}, at: __sock_map_delete net/core/sock_map.c:419 [inline] ffff888023235a40 (&stab->lock){+.-.}-{2:2}, at: sock_map_delete_elem+0x161/0x230 net/core/sock_map.c:451 but task is already holding lock: ffff8880760c8240 (&stab->lock){+.-.}-{2:2}, at: __sock_map_delete net/core/sock_map.c:419 [inline] ffff8880760c8240 (&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 7 locks held by syz-executor.2/3713: #0: ffff88807ebd8460 (sb_writers#4){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:3010 [inline] #0: ffff88807ebd8460 (sb_writers#4){.+.+}-{0:0}, at: vfs_fallocate+0x4ba/0x6b0 fs/open.c:322 #1: ffff88807ebdab98 (&sbi->s_writepages_rwsem){.+.+}-{0:0}, at: ext4_writepages+0x1e5/0x3de0 fs/ext4/inode.c:2703 #2: ffff88807ebdc990 (jbd2_handle){++++}-{0:0}, at: start_this_handle+0x1f51/0x21b0 fs/jbd2/transaction.c:463 #3: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline] #3: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline] #3: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2272 [inline] #3: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run3+0x146/0x440 kernel/trace/bpf_trace.c:2313 #4: ffff8880760c8240 (&stab->lock){+.-.}-{2:2}, at: __sock_map_delete net/core/sock_map.c:419 [inline] #4: ffff8880760c8240 (&stab->lock){+.-.}-{2:2}, at: sock_map_delete_elem+0x161/0x230 net/core/sock_map.c:451 #5: ffff88807cfb3290 (&psock->link_lock){+...}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:356 [inline] #5: ffff88807cfb3290 (&psock->link_lock){+...}-{2:2}, at: sock_map_del_link net/core/sock_map.c:147 [inline] #5: ffff88807cfb3290 (&psock->link_lock){+...}-{2:2}, at: sock_map_unref+0xcc/0x5d0 net/core/sock_map.c:182 #6: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:350 [inline] #6: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:791 [inline] #6: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2272 [inline] #6: ffffffff8d12ac80 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run2+0x110/0x410 kernel/trace/bpf_trace.c:2312 stack backtrace: CPU: 1 PID: 3713 Comm: syz-executor.2 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_5f1d5fee127b8728+0x3a/0x43 bpf_dispatcher_nop_func include/linux/bpf.h:989 [inline] __bpf_prog_run include/linux/filter.h:596 [inline] bpf_prog_run include/linux/filter.h:610 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2273 [inline] bpf_trace_run2+0x361/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:596 [inline] bpf_prog_run include/linux/filter.h:610 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2273 [inline] bpf_trace_run3+0x3a1/0x440 kernel/trace/bpf_trace.c:2313 trace_ext4_da_write_pages include/trace/events/ext4.h:472 [inline] ext4_writepages+0x3409/0x3de0 fs/ext4/inode.c:2840 do_writepages+0x3a2/0x670 mm/page-writeback.c:2469 filemap_fdatawrite_wbc+0x121/0x180 mm/filemap.c:388 __filemap_fdatawrite_range mm/filemap.c:421 [inline] filemap_write_and_wait_range+0x1a4/0x290 mm/filemap.c:674 ext4_punch_hole+0x1bf/0xd00 fs/ext4/inode.c:4022 ext4_fallocate+0x30b/0x2160 fs/ext4/extents.c:4737 vfs_fallocate+0x547/0x6b0 fs/open.c:323 do_vfs_ioctl+0x222c/0x2a90 fs/ioctl.c:849 __do_sys_ioctl fs/ioctl.c:868 [inline] __se_sys_ioctl+0x81/0x160 fs/ioctl.c:856 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:0x7ff663c7cee9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 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 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ff664a960c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007ff663dabf80 RCX: 00007ff663c7cee9 RDX: 0000000020000280 RSI: 000000004030582b RDI: 0000000000000009 RBP: 00007ff663cc949e R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007ff663dabf80 R15: 00007ffdc33b1268