============================================ WARNING: possible recursive locking detected 6.7.0-rc4-syzkaller #0 Not tainted -------------------------------------------- kworker/u4:8/2472 is trying to acquire lock: ffff888020c640b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfsplus_find_init+0x16e/0x200 fs/hfsplus/bfind.c:33 but task is already holding lock: ffff888020c640b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfsplus_find_init+0x16e/0x200 fs/hfsplus/bfind.c:33 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:8/2472: #0: ffff88814424b938 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work+0x789/0x15d0 kernel/workqueue.c:2605 #1: ffffc9000a24fd80 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work+0x7eb/0x15d0 kernel/workqueue.c:2606 #2: ffff88806d328848 (&hip->extents_lock){+.+.}-{3:3}, at: hfsplus_ext_write_extent+0x82/0x200 fs/hfsplus/extents.c:149 #3: ffff888020c640b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfsplus_find_init+0x16e/0x200 fs/hfsplus/bfind.c:33 #4: ffff88806ccdb588 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_extend+0x1c1/0x1090 fs/hfsplus/extents.c:457 stack backtrace: CPU: 1 PID: 2472 Comm: kworker/u4:8 Not tainted 6.7.0-rc4-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023 Workqueue: writeback wb_workfn (flush-7:0) Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 check_deadlock kernel/locking/lockdep.c:3062 [inline] validate_chain kernel/locking/lockdep.c:3856 [inline] __lock_acquire+0x20f8/0x3b20 kernel/locking/lockdep.c:5137 lock_acquire kernel/locking/lockdep.c:5754 [inline] lock_acquire+0x1ae/0x520 kernel/locking/lockdep.c:5719 __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x175/0x9d0 kernel/locking/mutex.c:747 hfsplus_find_init+0x16e/0x200 fs/hfsplus/bfind.c:33 hfsplus_ext_read_extent+0x18f/0x240 fs/hfsplus/extents.c:216 hfsplus_file_extend+0x695/0x1090 fs/hfsplus/extents.c:461 hfsplus_bmap_reserve+0x318/0x410 fs/hfsplus/btree.c:358 __hfsplus_ext_write_extent+0x470/0x5e0 fs/hfsplus/extents.c:104 hfsplus_ext_write_extent_locked fs/hfsplus/extents.c:139 [inline] hfsplus_ext_write_extent_locked fs/hfsplus/extents.c:129 [inline] hfsplus_ext_write_extent+0x1c5/0x200 fs/hfsplus/extents.c:150 hfsplus_write_inode+0x22/0x4f0 fs/hfsplus/super.c:154 write_inode fs/fs-writeback.c:1473 [inline] __writeback_single_inode+0xa91/0xe90 fs/fs-writeback.c:1690 writeback_sb_inodes+0x599/0x1080 fs/fs-writeback.c:1916 wb_writeback+0x2a5/0xaa0 fs/fs-writeback.c:2092 wb_do_writeback fs/fs-writeback.c:2239 [inline] wb_workfn+0x29c/0xfe0 fs/fs-writeback.c:2279 process_one_work+0x886/0x15d0 kernel/workqueue.c:2630 process_scheduled_works kernel/workqueue.c:2703 [inline] worker_thread+0x8b9/0x1290 kernel/workqueue.c:2784 kthread+0x2c6/0x3a0 kernel/kthread.c:388 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:242