============================================ WARNING: possible recursive locking detected 6.1.92-syzkaller #0 Not tainted -------------------------------------------- syz-executor.4/3963 is trying to acquire lock: ffff8880588880b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfs_find_init+0x16a/0x1e0 but task is already holding lock: ffff8880588880b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfs_find_init+0x16a/0x1e0 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&tree->tree_lock/1); lock(&tree->tree_lock/1); *** DEADLOCK *** May be due to missing lock nesting notation 6 locks held by syz-executor.4/3963: #0: ffff88807a1f34e8 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0x2ba/0x360 fs/file.c:1062 #1: ffff888021b66460 (sb_writers#19){.+.+}-{0:0}, at: vfs_write+0x269/0xba0 fs/read_write.c:580 #2: ffff888058959628 (&sb->s_type->i_mutex_key#27){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:758 [inline] #2: ffff888058959628 (&sb->s_type->i_mutex_key#27){+.+.}-{3:3}, at: generic_file_write_iter+0x7f/0x310 mm/filemap.c:3974 #3: ffff888058959478 (&HFS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfs_extend_file+0xfb/0x1440 fs/hfs/extent.c:397 #4: ffff8880588880b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfs_find_init+0x16a/0x1e0 #5: ffff8880589580f8 (&HFS_I(tree->inode)->extents_lock){+.+.}-{3:3}, at: hfs_extend_file+0xfb/0x1440 fs/hfs/extent.c:397 stack backtrace: CPU: 0 PID: 3963 Comm: syz-executor.4 Not tainted 6.1.92-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 __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x132/0xd80 kernel/locking/mutex.c:747