loop1: detected capacity change from 0 to 1024 hfsplus: inconsistency in B*Tree (9,1,255,1,0) ============================================ WARNING: possible recursive locking detected syzkaller #0 Not tainted -------------------------------------------- syz.1.564/9308 is trying to acquire lock: ffff0000c238cb48 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{4:4}, at: hfsplus_get_block+0x2d4/0x1244 fs/hfsplus/extents.c:260 but task is already holding lock: ffff0000c238c488 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{4:4}, at: hfsplus_file_extend+0x1b8/0x1530 fs/hfsplus/extents.c:453 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&HFSPLUS_I(inode)->extents_lock); lock(&HFSPLUS_I(inode)->extents_lock); *** DEADLOCK *** May be due to missing lock nesting notation 6 locks held by syz.1.564/9308: #0: ffff0000cf6c20e0 (&type->s_umount_key#56/1){+.+.}-{4:4}, at: alloc_super+0x168/0x7d4 fs/super.c:344 #1: ffff0000d6869998 (&sbi->vh_mutex){+.+.}-{4:4}, at: hfsplus_fill_super+0xf4c/0x16fc fs/hfsplus/super.c:573 #2: ffff0000cf6c60b0 (&tree->tree_lock){+.+.}-{4:4}, at: hfsplus_find_init+0x154/0x278 fs/hfsplus/bfind.c:28 #3: ffff0000ee4200b0 (&tree->tree_lock/2){+.+.}-{4:4}, at: hfsplus_find_init+0x154/0x278 fs/hfsplus/bfind.c:28 #4: ffff0000c238c488 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{4:4}, at: hfsplus_file_extend+0x1b8/0x1530 fs/hfsplus/extents.c:453 #5: ffff0000d68698f8 (&sbi->alloc_mutex){+.+.}-{4:4}, at: hfsplus_block_allocate+0x94/0x91c fs/hfsplus/bitmap.c:35 stack backtrace: CPU: 0 UID: 0 PID: 9308 Comm: syz.1.564 Not tainted syzkaller #0 PREEMPT Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/30/2025 Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:499 (C) __dump_stack+0x30/0x40 lib/dump_stack.c:94 dump_stack_lvl+0xd8/0x12c lib/dump_stack.c:120 dump_stack+0x1c/0x28 lib/dump_stack.c:129 print_deadlock_bug+0x2e8/0x2f0 kernel/locking/lockdep.c:3041 check_deadlock kernel/locking/lockdep.c:3093 [inline] validate_chain kernel/locking/lockdep.c:3895 [inline] __lock_acquire+0x2940/0x30a4 kernel/locking/lockdep.c:5237 lock_acquire+0x14c/0x2e0 kernel/locking/lockdep.c:5868 __mutex_lock_common+0x1d0/0x2678 kernel/locking/mutex.c:598 __mutex_lock kernel/locking/mutex.c:760 [inline] mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:812 hfsplus_get_block+0x2d4/0x1244 fs/hfsplus/extents.c:260 block_read_full_folio+0x2ec/0x824 fs/buffer.c:2420 hfsplus_read_folio+0x28/0x38 fs/hfsplus/inode.c:28 filemap_read_folio+0xec/0x2f8 mm/filemap.c:2444 do_read_cache_folio+0x364/0x5bc mm/filemap.c:4024 do_read_cache_page mm/filemap.c:4090 [inline] read_cache_page+0x6c/0x160 mm/filemap.c:4099 read_mapping_page include/linux/pagemap.h:993 [inline] hfsplus_block_allocate+0xe4/0x91c fs/hfsplus/bitmap.c:37 hfsplus_file_extend+0x774/0x1530 fs/hfsplus/extents.c:464 hfsplus_bmap_reserve+0xe8/0x494 fs/hfsplus/btree.c:358 hfsplus_create_attr+0x198/0x400 fs/hfsplus/attributes.c:221 __hfsplus_setxattr+0x920/0x1fb0 fs/hfsplus/xattr.c:358 hfsplus_initxattrs+0x18c/0x244 fs/hfsplus/xattr_security.c:59 security_inode_init_security+0x6dc/0x7f4 security/security.c:1891 hfsplus_init_security+0x40/0x54 fs/hfsplus/xattr_security.c:71 hfsplus_fill_super+0x1080/0x16fc fs/hfsplus/super.c:587 get_tree_bdev_flags+0x360/0x414 fs/super.c:1691 get_tree_bdev+0x2c/0x3c fs/super.c:1714 hfsplus_get_tree+0x28/0x38 fs/hfsplus/super.c:659 vfs_get_tree+0x90/0x28c fs/super.c:1751 fc_mount fs/namespace.c:1208 [inline] do_new_mount_fc fs/namespace.c:3651 [inline] do_new_mount+0x284/0x944 fs/namespace.c:3727 path_mount+0x5b4/0xdfc fs/namespace.c:4037 do_mount fs/namespace.c:4050 [inline] __do_sys_mount fs/namespace.c:4238 [inline] __se_sys_mount fs/namespace.c:4215 [inline] __arm64_sys_mount+0x3e8/0x468 fs/namespace.c:4215 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x254 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x5c/0x254 arch/arm64/kernel/entry-common.c:746 el0t_64_sync_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:765 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596 hfsplus: inconsistency in B*Tree (9,1,255,1,0) hfsplus: xattr search failed hfsplus: b-tree write err: -5, ino 4