====================================================== WARNING: possible circular locking dependency detected 5.15.161-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.3/6546 is trying to acquire lock: ffff88807a4bcb48 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_get_block+0x37f/0x14e0 fs/hfsplus/extents.c:260 but task is already holding lock: ffff8880761c00b0 (&tree->tree_lock){+.+.}-{3:3}, at: hfsplus_find_init+0x146/0x1c0 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&tree->tree_lock){+.+.}-{3:3}: lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623 __mutex_lock_common+0x1da/0x25a0 kernel/locking/mutex.c:596 __mutex_lock kernel/locking/mutex.c:729 [inline] mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743 hfsplus_file_truncate+0x864/0xb80 fs/hfsplus/extents.c:595 hfsplus_delete_inode+0x170/0x220 hfsplus_unlink+0x50d/0x7f0 fs/hfsplus/dir.c:405 vfs_unlink+0x359/0x5f0 fs/namei.c:4280 do_unlinkat+0x4a3/0x950 fs/namei.c:4348 __do_sys_unlink fs/namei.c:4396 [inline] __se_sys_unlink fs/namei.c:4394 [inline] __x64_sys_unlink+0x45/0x50 fs/namei.c:4394 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 -> #0 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}: check_prev_add kernel/locking/lockdep.c:3053 [inline] check_prevs_add kernel/locking/lockdep.c:3172 [inline] validate_chain+0x1649/0x5930 kernel/locking/lockdep.c:3788 __lock_acquire+0x1295/0x1ff0 kernel/locking/lockdep.c:5012 lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623 __mutex_lock_common+0x1da/0x25a0 kernel/locking/mutex.c:596 __mutex_lock kernel/locking/mutex.c:729 [inline] mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743 hfsplus_get_block+0x37f/0x14e0 fs/hfsplus/extents.c:260 block_read_full_page+0x2f9/0xde0 fs/buffer.c:2290 do_read_cache_page+0x752/0x1040 read_mapping_page include/linux/pagemap.h:515 [inline] __hfs_bnode_create+0x4f2/0xbb0 fs/hfsplus/bnode.c:447 hfsplus_bnode_find+0x22e/0xe80 fs/hfsplus/bnode.c:497 hfsplus_brec_find+0x17f/0x570 fs/hfsplus/bfind.c:183 hfsplus_brec_read+0x27/0x100 fs/hfsplus/bfind.c:222 hfsplus_find_cat+0x17b/0x5c0 fs/hfsplus/catalog.c:202 hfsplus_iget+0x403/0x640 fs/hfsplus/super.c:82 hfsplus_fill_super+0xca4/0x1c90 fs/hfsplus/super.c:503 mount_bdev+0x2c9/0x3f0 fs/super.c:1387 legacy_get_tree+0xeb/0x180 fs/fs_context.c:611 vfs_get_tree+0x88/0x270 fs/super.c:1517 do_new_mount+0x2ba/0xb40 fs/namespace.c:3005 do_mount fs/namespace.c:3348 [inline] __do_sys_mount fs/namespace.c:3556 [inline] __se_sys_mount+0x2d5/0x3c0 fs/namespace.c:3533 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&tree->tree_lock); lock(&HFSPLUS_I(inode)->extents_lock); lock(&tree->tree_lock); lock(&HFSPLUS_I(inode)->extents_lock); *** DEADLOCK *** 2 locks held by syz-executor.3/6546: #0: ffff8880761c40e0 (&type->s_umount_key#68/1){+.+.}-{3:3}, at: alloc_super+0x210/0x940 fs/super.c:229 #1: ffff8880761c00b0 (&tree->tree_lock){+.+.}-{3:3}, at: hfsplus_find_init+0x146/0x1c0 stack backtrace: CPU: 1 PID: 6546 Comm: syz-executor.3 Not tainted 5.15.161-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106 check_noncircular+0x2f8/0x3b0 kernel/locking/lockdep.c:2133 check_prev_add kernel/locking/lockdep.c:3053 [inline] check_prevs_add kernel/locking/lockdep.c:3172 [inline] validate_chain+0x1649/0x5930 kernel/locking/lockdep.c:3788 __lock_acquire+0x1295/0x1ff0 kernel/locking/lockdep.c:5012 lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623 __mutex_lock_common+0x1da/0x25a0 kernel/locking/mutex.c:596 __mutex_lock kernel/locking/mutex.c:729 [inline] mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743 hfsplus_get_block+0x37f/0x14e0 fs/hfsplus/extents.c:260 block_read_full_page+0x2f9/0xde0 fs/buffer.c:2290 do_read_cache_page+0x752/0x1040 read_mapping_page include/linux/pagemap.h:515 [inline] __hfs_bnode_create+0x4f2/0xbb0 fs/hfsplus/bnode.c:447 hfsplus_bnode_find+0x22e/0xe80 fs/hfsplus/bnode.c:497 hfsplus_brec_find+0x17f/0x570 fs/hfsplus/bfind.c:183 hfsplus_brec_read+0x27/0x100 fs/hfsplus/bfind.c:222 hfsplus_find_cat+0x17b/0x5c0 fs/hfsplus/catalog.c:202 hfsplus_iget+0x403/0x640 fs/hfsplus/super.c:82 hfsplus_fill_super+0xca4/0x1c90 fs/hfsplus/super.c:503 mount_bdev+0x2c9/0x3f0 fs/super.c:1387 legacy_get_tree+0xeb/0x180 fs/fs_context.c:611 vfs_get_tree+0x88/0x270 fs/super.c:1517 do_new_mount+0x2ba/0xb40 fs/namespace.c:3005 do_mount fs/namespace.c:3348 [inline] __do_sys_mount fs/namespace.c:3556 [inline] __se_sys_mount+0x2d5/0x3c0 fs/namespace.c:3533 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f67e9dae62a Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 de 09 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f67e8925ef8 EFLAGS: 00000202 ORIG_RAX: 00000000000000a5 RAX: ffffffffffffffda RBX: 00007f67e8925f80 RCX: 00007f67e9dae62a RDX: 0000000020000040 RSI: 0000000020000080 RDI: 00007f67e8925f40 RBP: 0000000020000040 R08: 00007f67e8925f80 R09: 0000000002000010 R10: 0000000002000010 R11: 0000000000000202 R12: 0000000020000080 R13: 00007f67e8925f40 R14: 00000000000006b3 R15: 00000000200013c0 hfsplus: failed to load root directory