loop0: detected capacity change from 0 to 1024 hfsplus: inconsistency in B*Tree (128,1,255,1,0) ============================================ WARNING: possible recursive locking detected syzkaller #0 Not tainted -------------------------------------------- syz.0.17/4513 is trying to acquire lock: ffff0000d8fe8108 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_extend+0x188/0x1324 fs/hfsplus/extents.c:455 but task is already holding lock: ffff0000d8fe8e88 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_extend+0x188/0x1324 fs/hfsplus/extents.c:455 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.0.17/4513: #0: ffff0000d640a460 (sb_writers#12){.+.+}-{0:0}, at: mnt_want_write+0x44/0x9c fs/namespace.c:402 #1: ffff0000d8fea4c0 (&sb->s_type->i_mutex_key#20){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:758 [inline] #1: ffff0000d8fea4c0 (&sb->s_type->i_mutex_key#20){+.+.}-{3:3}, at: vfs_setxattr+0x138/0x2a8 fs/xattr.c:308 #2: ffff0000d85840b0 (&tree->tree_lock){+.+.}-{3:3}, at: hfsplus_find_init+0x148/0x1c0 fs/hfsplus/bfind.c:28 #3: ffff0000d85820b0 (&tree->tree_lock/2){+.+.}-{3:3}, at: hfsplus_find_init+0x148/0x1c0 fs/hfsplus/bfind.c:28 #4: ffff0000d8fe8e88 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_extend+0x188/0x1324 fs/hfsplus/extents.c:455 #5: ffff0000d64080b0 (&tree->tree_lock/1){+.+.}-{3:3}, at: hfsplus_find_init+0x148/0x1c0 fs/hfsplus/bfind.c:28 stack backtrace: CPU: 0 PID: 4513 Comm: syz.0.17 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/07/2026 Call trace: dump_backtrace+0x1c4/0x1f0 arch/arm64/kernel/stacktrace.c:158 show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:165 __dump_stack+0x30/0x40 lib/dump_stack.c:88 dump_stack_lvl+0xf4/0x15c lib/dump_stack.c:106 dump_stack+0x1c/0x5c lib/dump_stack.c:113 __lock_acquire+0x15d0/0x6634 kernel/locking/lockdep.c:-1 lock_acquire+0x20c/0x638 kernel/locking/lockdep.c:5676 __mutex_lock_common+0x1a0/0x1f3c kernel/locking/mutex.c:603 __mutex_lock kernel/locking/mutex.c:747 [inline] mutex_lock_nested+0x38/0x44 kernel/locking/mutex.c:799 hfsplus_file_extend+0x188/0x1324 fs/hfsplus/extents.c:455 hfsplus_bmap_reserve+0xd0/0x458 fs/hfsplus/btree.c:358 __hfsplus_ext_write_extent+0x1e4/0x4b0 fs/hfsplus/extents.c:104 __hfsplus_ext_cache_extent+0x84/0x924 fs/hfsplus/extents.c:186 hfsplus_ext_read_extent fs/hfsplus/extents.c:218 [inline] hfsplus_file_extend+0x388/0x1324 fs/hfsplus/extents.c:459 hfsplus_bmap_reserve+0xd0/0x458 fs/hfsplus/btree.c:358 hfsplus_create_attr+0x1a0/0x4d8 fs/hfsplus/attributes.c:221 __hfsplus_setxattr+0x9e8/0x1b14 fs/hfsplus/xattr.c:358 hfsplus_setxattr+0xdc/0x12c fs/hfsplus/xattr.c:438 hfsplus_trusted_setxattr+0x54/0x6c fs/hfsplus/xattr_trusted.c:30 __vfs_setxattr+0x374/0x390 fs/xattr.c:182 __vfs_setxattr_noperm+0x120/0x56c fs/xattr.c:216 __vfs_setxattr_locked+0x1e8/0x214 fs/xattr.c:277 vfs_setxattr+0x158/0x2a8 fs/xattr.c:309 do_setxattr fs/xattr.c:594 [inline] setxattr+0x258/0x2d8 fs/xattr.c:617 path_setxattr+0x130/0x260 fs/xattr.c:636 __do_sys_lsetxattr fs/xattr.c:659 [inline] __se_sys_lsetxattr fs/xattr.c:655 [inline] __arm64_sys_lsetxattr+0xc4/0xe0 fs/xattr.c:655 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x290 arch/arm64/kernel/syscall.c:52 el0_svc_common+0x13c/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x5c/0x134 arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x128 arch/arm64/kernel/entry-common.c:637 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655 el0t_64_sync+0x18c/0x190 arch/arm64/kernel/entry.S:585