============================================ WARNING: possible recursive locking detected 5.15.112-syzkaller #0 Not tainted -------------------------------------------- kworker/u4:2/154 is trying to acquire lock: ffff888074d900b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfsplus_find_init+0x146/0x1c0 but task is already holding lock: ffff888074d900b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfsplus_find_init+0x146/0x1c0 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 5 locks held by kworker/u4:2/154: #0: ffff8881427dc938 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work+0x78a/0x10c0 kernel/workqueue.c:2280 #1: ffffc90001b9fd20 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work+0x7d0/0x10c0 kernel/workqueue.c:2282 #2: ffff888071b4a988 (&hip->extents_lock){+.+.}-{3:3}, at: hfsplus_ext_write_extent+0x8a/0x1f0 fs/hfsplus/extents.c:149 #3: ffff888074d900b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfsplus_find_init+0x146/0x1c0 #4: ffff888071b48108 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_extend+0x1d2/0x1b10 fs/hfsplus/extents.c:457 stack backtrace: CPU: 1 PID: 154 Comm: kworker/u4:2 Not tainted 5.15.112-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023 Workqueue: writeback wb_workfn (flush-7:0) 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:2946 [inline] check_deadlock kernel/locking/lockdep.c:2989 [inline] validate_chain+0x46cf/0x58b0 kernel/locking/lockdep.c:3774 __lock_acquire+0x1295/0x1ff0 kernel/locking/lockdep.c:5011 lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5622 __mutex_lock_common+0x1da/0x25a0 kernel/locking/mutex.c:596 __mutex_lock kernel/locking/mutex.c:729 [inline] mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743 hfsplus_find_init+0x146/0x1c0 hfsplus_ext_read_extent fs/hfsplus/extents.c:216 [inline] hfsplus_file_extend+0x40a/0x1b10 fs/hfsplus/extents.c:461 hfsplus_bmap_reserve+0x101/0x4e0 fs/hfsplus/btree.c:357 __hfsplus_ext_write_extent+0x2a4/0x5b0 fs/hfsplus/extents.c:104 hfsplus_ext_write_extent_locked fs/hfsplus/extents.c:139 [inline] hfsplus_ext_write_extent+0x166/0x1f0 fs/hfsplus/extents.c:150 hfsplus_write_inode+0x1e/0x5c0 fs/hfsplus/super.c:154 write_inode fs/fs-writeback.c:1478 [inline] __writeback_single_inode+0x644/0xe30 fs/fs-writeback.c:1683 writeback_sb_inodes+0xbf0/0x1a50 fs/fs-writeback.c:1908 wb_writeback+0x451/0xc50 fs/fs-writeback.c:2082 wb_do_writeback fs/fs-writeback.c:2225 [inline] wb_workfn+0x46c/0x1130 fs/fs-writeback.c:2266 process_one_work+0x8a1/0x10c0 kernel/workqueue.c:2307 worker_thread+0xaca/0x1280 kernel/workqueue.c:2454 kthread+0x3f6/0x4f0 kernel/kthread.c:319 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298