============================================ WARNING: possible recursive locking detected 6.1.82-syzkaller #0 Not tainted -------------------------------------------- kworker/u4:0/9 is trying to acquire lock: ffff0000d85f60b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfsplus_find_init+0x144/0x1bc but task is already holding lock: ffff0000d85f60b0 (&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:0/9: #0: ffff0000c2e4d938 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work+0x664/0x1404 kernel/workqueue.c:2265 #1: ffff800019e17c20 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work+0x6a8/0x1404 kernel/workqueue.c:2267 #2: ffff0000d855a988 (&hip->extents_lock){+.+.}-{3:3}, at: hfsplus_ext_write_extent+0x8c/0x1d8 fs/hfsplus/extents.c:149 #3: ffff0000d85f60b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfsplus_find_init+0x144/0x1bc #4: ffff0000d8558108 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_extend+0x198/0x14cc fs/hfsplus/extents.c:457 stack backtrace: CPU: 1 PID: 9 Comm: kworker/u4:0 Not tainted 6.1.82-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/25/2024 Workqueue: writeback wb_workfn (flush-7:0) Call trace: dump_backtrace+0x1c8/0x1f4 arch/arm64/kernel/stacktrace.c:158 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165 __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+0x6310/0x7680 kernel/locking/lockdep.c:5049 lock_acquire+0x26c/0x7cc kernel/locking/lockdep.c:5662 __mutex_lock_common+0x190/0x21a0 kernel/locking/mutex.c:603 __mutex_lock kernel/locking/mutex.c:747 [inline] mutex_lock_nested+0x38/0x44 kernel/locking/mutex.c:799 hfsplus_find_init+0x144/0x1bc hfsplus_ext_read_extent fs/hfsplus/extents.c:216 [inline] hfsplus_file_extend+0x364/0x14cc fs/hfsplus/extents.c:461 hfsplus_bmap_reserve+0xec/0x474 fs/hfsplus/btree.c:358 __hfsplus_ext_write_extent+0x1e8/0x4ac 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/0x4dc fs/hfsplus/super.c:154 write_inode fs/fs-writeback.c:1460 [inline] __writeback_single_inode+0x614/0x1770 fs/fs-writeback.c:1677 writeback_sb_inodes+0x978/0x1718 fs/fs-writeback.c:1903 wb_writeback+0x414/0x1130 fs/fs-writeback.c:2077 wb_do_writeback fs/fs-writeback.c:2220 [inline] wb_workfn+0x3a8/0x1034 fs/fs-writeback.c:2260 process_one_work+0x7ac/0x1404 kernel/workqueue.c:2292 worker_thread+0x8e4/0xfec kernel/workqueue.c:2439 kthread+0x250/0x2d8 kernel/kthread.c:376 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:864