============================================ WARNING: possible recursive locking detected 6.6.0-rc6-syzkaller-00182-gce55c22ec8b2 #0 Not tainted -------------------------------------------- kworker/u4:5/164 is trying to acquire lock: ffff8880708a60b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfs_find_init+0x16e/0x1f0 but task is already holding lock: ffff8880708a60b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfs_find_init+0x16e/0x1f0 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 4 locks held by kworker/u4:5/164: #0: ffff888018a75d38 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:2605 [inline] #0: ffff888018a75d38 ((wq_completion)writeback){+.+.}-{0:0}, at: process_scheduled_works+0x825/0x1400 kernel/workqueue.c:2703 #1: ffffc90002e1fd20 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:2605 [inline] #1: ffffc90002e1fd20 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_scheduled_works+0x825/0x1400 kernel/workqueue.c:2703 #2: ffff8880708a60b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfs_find_init+0x16e/0x1f0 #3: ffff8880708a80f8 (&HFS_I(tree->inode)->extents_lock){+.+.}-{3:3}, at: hfs_extend_file+0xff/0x1440 fs/hfs/extent.c:397 stack backtrace: CPU: 1 PID: 164 Comm: kworker/u4:5 Not tainted 6.6.0-rc6-syzkaller-00182-gce55c22ec8b2 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/06/2023 Workqueue: writeback wb_workfn (flush-7:0) Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106 check_deadlock kernel/locking/lockdep.c:3062 [inline] validate_chain kernel/locking/lockdep.c:3855 [inline] __lock_acquire+0x6a81/0x7f70 kernel/locking/lockdep.c:5136 lock_acquire+0x1e3/0x520 kernel/locking/lockdep.c:5753 __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x136/0xd60 kernel/locking/mutex.c:747 hfs_find_init+0x16e/0x1f0 hfs_ext_read_extent fs/hfs/extent.c:200 [inline] hfs_extend_file+0x31b/0x1440 fs/hfs/extent.c:401 hfs_bmap_reserve+0xd9/0x3f0 fs/hfs/btree.c:234 __hfs_ext_write_extent+0x22e/0x4f0 fs/hfs/extent.c:121 hfs_ext_write_extent+0x154/0x1d0 fs/hfs/extent.c:144 hfs_write_inode+0xbc/0xec0 fs/hfs/inode.c:431 write_inode fs/fs-writeback.c:1456 [inline] __writeback_single_inode+0x69b/0xfa0 fs/fs-writeback.c:1673 writeback_sb_inodes+0x8e3/0x1210 fs/fs-writeback.c:1899 wb_writeback+0x44d/0xc60 fs/fs-writeback.c:2075 wb_do_writeback fs/fs-writeback.c:2222 [inline] wb_workfn+0x400/0xff0 fs/fs-writeback.c:2262 process_one_work kernel/workqueue.c:2630 [inline] process_scheduled_works+0x90f/0x1400 kernel/workqueue.c:2703 worker_thread+0xa5f/0xff0 kernel/workqueue.c:2784 kthread+0x2d3/0x370 kernel/kthread.c:388 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:304