============================================ WARNING: possible recursive locking detected 6.12.0-rc1-syzkaller-g0c559323bbaa #0 Not tainted -------------------------------------------- kworker/u32:7/1104 is trying to acquire lock: ffff8881077140b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfsplus_find_init+0x17b/0x1f0 fs/hfsplus/bfind.c:28 but task is already holding lock: ffff8881077140b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfsplus_find_init+0x17b/0x1f0 fs/hfsplus/bfind.c:28 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/u32:7/1104: #0: ffff888103af7948 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work+0x129b/0x1ba0 kernel/workqueue.c:3204 #1: ffffc90005be7d80 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work+0x921/0x1ba0 kernel/workqueue.c:3205 #2: ffff8880335c1c08 (&hip->extents_lock){+.+.}-{3:3}, at: hfsplus_ext_write_extent+0x82/0x210 fs/hfsplus/extents.c:149 #3: ffff8881077140b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfsplus_find_init+0x17b/0x1f0 fs/hfsplus/bfind.c:28 #4: ffff8880335c0108 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_extend+0x1c1/0x1090 fs/hfsplus/extents.c:458 stack backtrace: CPU: 2 UID: 0 PID: 1104 Comm: kworker/u32:7 Not tainted 6.12.0-rc1-syzkaller-g0c559323bbaa #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Workqueue: writeback wb_workfn (flush-7:0) Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_deadlock_bug+0x2e3/0x410 kernel/locking/lockdep.c:3037 check_deadlock kernel/locking/lockdep.c:3089 [inline] validate_chain kernel/locking/lockdep.c:3891 [inline] __lock_acquire+0x2185/0x3ce0 kernel/locking/lockdep.c:5202 lock_acquire.part.0+0x11b/0x380 kernel/locking/lockdep.c:5825 __mutex_lock_common kernel/locking/mutex.c:608 [inline] __mutex_lock+0x175/0x9c0 kernel/locking/mutex.c:752 hfsplus_find_init+0x17b/0x1f0 fs/hfsplus/bfind.c:28 hfsplus_ext_read_extent+0x18f/0x250 fs/hfsplus/extents.c:216 hfsplus_file_extend+0x699/0x1090 fs/hfsplus/extents.c:462 hfsplus_bmap_reserve+0x31c/0x410 fs/hfsplus/btree.c:358 __hfsplus_ext_write_extent+0x474/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+0x1c9/0x210 fs/hfsplus/extents.c:150 hfsplus_write_inode+0x22/0x4f0 fs/hfsplus/super.c:154 write_inode fs/fs-writeback.c:1503 [inline] __writeback_single_inode+0xb49/0xfa0 fs/fs-writeback.c:1723 writeback_sb_inodes+0x603/0xfa0 fs/fs-writeback.c:1954 wb_writeback+0x199/0xb50 fs/fs-writeback.c:2134 wb_do_writeback fs/fs-writeback.c:2281 [inline] wb_workfn+0x294/0xbc0 fs/fs-writeback.c:2321 process_one_work+0x9c5/0x1ba0 kernel/workqueue.c:3229 process_scheduled_works kernel/workqueue.c:3310 [inline] worker_thread+0x6c8/0xf00 kernel/workqueue.c:3391 kthread+0x2c1/0x3a0 kernel/kthread.c:389 ret_from_fork+0x45/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244