============================================ WARNING: possible recursive locking detected 5.15.158-syzkaller #0 Not tainted -------------------------------------------- kworker/u4:1/136 is trying to acquire lock: ffff0000c84c80b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfsplus_find_init+0x144/0x1bc but task is already holding lock: ffff0000c84c80b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfsplus_find_init+0x144/0x1bc 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:1/136: #0: ffff0000c21c8138 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work+0x66c/0x11b8 kernel/workqueue.c:2283 #1: ffff80001a357c00 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work+0x6ac/0x11b8 kernel/workqueue.c:2285 #2: ffff0000c7c9a988 (&hip->extents_lock){+.+.}-{3:3}, at: hfsplus_ext_write_extent+0x8c/0x1d8 fs/hfsplus/extents.c:149 #3: ffff0000c84c80b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfsplus_find_init+0x144/0x1bc #4: ffff0000c7c98108 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_extend+0x198/0x14e0 fs/hfsplus/extents.c:457 stack backtrace: CPU: 1 PID: 136 Comm: kworker/u4:1 Not tainted 5.15.158-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/27/2024 Workqueue: writeback wb_workfn (flush-7:0) Call trace: dump_backtrace+0x0/0x530 arch/arm64/kernel/stacktrace.c:152 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:216 __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x108/0x170 lib/dump_stack.c:106 dump_stack+0x1c/0x58 lib/dump_stack.c:113 __lock_acquire+0x62bc/0x7638 kernel/locking/lockdep.c:5012 lock_acquire+0x240/0x77c kernel/locking/lockdep.c:5623 __mutex_lock_common+0x194/0x2154 kernel/locking/mutex.c:596 __mutex_lock kernel/locking/mutex.c:729 [inline] mutex_lock_nested+0xa4/0xf8 kernel/locking/mutex.c:743 hfsplus_find_init+0x144/0x1bc hfsplus_ext_read_extent fs/hfsplus/extents.c:216 [inline] hfsplus_file_extend+0x364/0x14e0 fs/hfsplus/extents.c:461 hfsplus_bmap_reserve+0xec/0x474 fs/hfsplus/btree.c:357 __hfsplus_ext_write_extent+0x1e8/0x4bc fs/hfsplus/extents.c:104 hfsplus_ext_write_extent_locked fs/hfsplus/extents.c:139 [inline] hfsplus_ext_write_extent+0x158/0x1d8 fs/hfsplus/extents.c:150 hfsplus_write_inode+0x34/0x4ec fs/hfsplus/super.c:154 write_inode fs/fs-writeback.c:1495 [inline] __writeback_single_inode+0x584/0x13a4 fs/fs-writeback.c:1705 writeback_sb_inodes+0x94c/0x1654 fs/fs-writeback.c:1930 wb_writeback+0x3fc/0xfc8 fs/fs-writeback.c:2104 wb_do_writeback fs/fs-writeback.c:2247 [inline] wb_workfn+0x3a4/0x1070 fs/fs-writeback.c:2288 process_one_work+0x790/0x11b8 kernel/workqueue.c:2310 worker_thread+0x910/0x1034 kernel/workqueue.c:2457 kthread+0x37c/0x45c kernel/kthread.c:334 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:870