============================================ WARNING: possible recursive locking detected 5.15.160-syzkaller #0 Not tainted -------------------------------------------- syz-executor.0/3638 is trying to acquire lock: ffff8880b9b35ca8 (lock){..-.}-{2:2}, at: local_lock_acquire+0x7/0x130 include/linux/local_lock_internal.h:28 but task is already holding lock: ffff8880b9b35ca8 (lock){..-.}-{2:2}, at: local_lock_acquire+0x7/0x130 include/linux/local_lock_internal.h:28 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(lock); lock(lock); *** DEADLOCK *** May be due to missing lock nesting notation 6 locks held by syz-executor.0/3638: #0: ffff88814b814460 (sb_writers#5){.+.+}-{0:0}, at: file_start_write include/linux/fs.h:3037 [inline] #0: ffff88814b814460 (sb_writers#5){.+.+}-{0:0}, at: vfs_fallocate+0x4bd/0x6b0 fs/open.c:307 #1: ffff88805c425da8 (&sb->s_type->i_mutex_key#9){++++}-{3:3}, at: inode_lock include/linux/fs.h:789 [inline] #1: ffff88805c425da8 (&sb->s_type->i_mutex_key#9){++++}-{3:3}, at: ext4_punch_hole+0x1d4/0xc10 fs/ext4/inode.c:3989 #2: ffff88805c425f48 (mapping.invalidate_lock){++++}-{3:3}, at: filemap_invalidate_lock include/linux/fs.h:834 [inline] #2: ffff88805c425f48 (mapping.invalidate_lock){++++}-{3:3}, at: ext4_punch_hole+0x3ba/0xc10 fs/ext4/inode.c:4036 #3: ffff8880b9b35ca8 (lock){..-.}-{2:2}, at: local_lock_acquire+0x7/0x130 include/linux/local_lock_internal.h:28 #4: ffffffff8c91fae0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x5/0x30 include/linux/rcupdate.h:311 #5: ffff88807ec9d1b8 (&trie->lock){....}-{2:2}, at: trie_delete_elem+0x90/0x690 kernel/bpf/lpm_trie.c:450 stack backtrace: CPU: 1 PID: 3638 Comm: syz-executor.0 Not tainted 5.15.160-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 local_lock_acquire+0x23/0x130 include/linux/local_lock_internal.h:29 rmqueue_pcplist mm/page_alloc.c:3652 [inline] rmqueue mm/page_alloc.c:3690 [inline] get_page_from_freelist+0x27cc/0x33c0 mm/page_alloc.c:4156 __alloc_pages+0x272/0x700 mm/page_alloc.c:5423 stack_depot_save+0x319/0x440 lib/stackdepot.c:302 kasan_save_stack+0x4d/0x60 mm/kasan/common.c:40 kasan_record_aux_stack+0xba/0x100 mm/kasan/generic.c:348 kvfree_call_rcu+0x118/0x8a0 kernel/rcu/tree.c:3596 trie_delete_elem+0x520/0x690 bpf_prog_2c29ac5cdc6b1842+0x3a/0x294 bpf_dispatcher_nop_func include/linux/bpf.h:790 [inline] __bpf_prog_run include/linux/filter.h:621 [inline] bpf_prog_run include/linux/filter.h:635 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:1880 [inline] bpf_trace_run1+0x253/0x2f0 kernel/trace/bpf_trace.c:1916 __bpf_trace_mm_page_free_batched+0x41/0x60 include/trace/events/kmem.h:182 trace_mm_page_free_batched include/trace/events/kmem.h:182 [inline] free_unref_page_list+0x79b/0x8e0 mm/page_alloc.c:3465 release_pages+0x1bb9/0x1f40 mm/swap.c:963 __pagevec_release+0x80/0xf0 mm/swap.c:983 pagevec_release include/linux/pagevec.h:81 [inline] truncate_inode_pages_range+0x48b/0x1290 mm/truncate.c:329 ext4_punch_hole+0x4a7/0xc10 fs/ext4/inode.c:4050 ext4_fallocate+0x30a/0x20c0 fs/ext4/extents.c:4740 vfs_fallocate+0x54a/0x6b0 fs/open.c:308 do_vfs_ioctl+0x2317/0x2b70 fs/ioctl.c:853 __do_sys_ioctl fs/ioctl.c:872 [inline] __se_sys_ioctl+0x81/0x160 fs/ioctl.c:860 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:0x7f5733bdbee9 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:00007f573214f0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f5733d12f80 RCX: 00007f5733bdbee9 RDX: 0000000020000280 RSI: 000000004030582b RDI: 0000000000000003 RBP: 00007f5733c2847f R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007f5733d12f80 R15: 00007fff88e73368