============================================ WARNING: possible recursive locking detected 5.15.154-syzkaller #0 Not tainted -------------------------------------------- syz-executor.3/3761 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.3/3761: #0: ffff888024836460 (sb_writers#5){.+.+}-{0:0}, at: mnt_want_write+0x3b/0x80 fs/namespace.c:377 #1: ffff888072f5d3b0 (&sb->s_type->i_mutex_key#9){++++}-{3:3}, at: inode_lock include/linux/fs.h:789 [inline] #1: ffff888072f5d3b0 (&sb->s_type->i_mutex_key#9){++++}-{3:3}, at: do_truncate+0x208/0x300 fs/open.c:63 #2: ffff888072f5d550 (mapping.invalidate_lock){++++}-{3:3}, at: filemap_invalidate_lock include/linux/fs.h:834 [inline] #2: ffff888072f5d550 (mapping.invalidate_lock){++++}-{3:3}, at: ext4_setattr+0xd6c/0x1990 fs/ext4/inode.c:5459 #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: ffff8880601ce1b8 (&trie->lock){....}-{2:2}, at: trie_delete_elem+0x90/0x690 kernel/bpf/lpm_trie.c:450 stack backtrace: CPU: 1 PID: 3761 Comm: syz-executor.3 Not tainted 5.15.154-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/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/0xb1c bpf_dispatcher_nop_func include/linux/bpf.h:785 [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_run1+0x168/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 truncate_inode_pages mm/truncate.c:425 [inline] truncate_pagecache+0x68/0x80 mm/truncate.c:735 ext4_setattr+0xe56/0x1990 fs/ext4/inode.c:5530 notify_change+0xc6d/0xf50 fs/attr.c:505 do_truncate+0x21c/0x300 fs/open.c:65 handle_truncate fs/namei.c:3265 [inline] do_open fs/namei.c:3612 [inline] path_openat+0x28a3/0x2f20 fs/namei.c:3742 do_filp_open+0x21c/0x460 fs/namei.c:3769 do_sys_openat2+0x13b/0x500 fs/open.c:1253 do_sys_open fs/open.c:1269 [inline] __do_sys_openat fs/open.c:1285 [inline] __se_sys_openat fs/open.c:1280 [inline] __x64_sys_openat+0x243/0x290 fs/open.c:1280 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:0x7feead2b8e69 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:00007feeab82b0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 RAX: ffffffffffffffda RBX: 00007feead3e6f80 RCX: 00007feead2b8e69 RDX: 0000000000007a05 RSI: 0000000020000140 RDI: ffffffffffffff9c RBP: 00007feead30547a R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000001700 R11: 0000000000000246 R12: 0000000000000000 R13: 000000000000000b R14: 00007feead3e6f80 R15: 00007ffcdbcc12a8