loop3: detected capacity change from 0 to 1024 ============================================ WARNING: possible recursive locking detected syzkaller #0 Not tainted -------------------------------------------- syz.3.151/4960 is trying to acquire lock: ffff0000c4d79548 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_get_block+0x2b0/0x11a0 fs/hfsplus/extents.c:260 but task is already holding lock: ffff0000c4d7a988 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_truncate+0x21c/0x9a4 fs/hfsplus/extents.c:574 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 4 locks held by syz.3.151/4960: #0: ffff0000cc0d8460 (sb_writers#21){.+.+}-{0:0}, at: mnt_want_write+0x44/0x9c fs/namespace.c:402 #1: ffff0000c4d7ab80 (&sb->s_type->i_mutex_key#27){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:758 [inline] #1: ffff0000c4d7ab80 (&sb->s_type->i_mutex_key#27){+.+.}-{3:3}, at: do_truncate+0x174/0x20c fs/open.c:63 #2: ffff0000c4d7a988 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_truncate+0x21c/0x9a4 fs/hfsplus/extents.c:574 #3: ffff0000ccd330f8 (&sbi->alloc_mutex){+.+.}-{3:3}, at: hfsplus_block_free+0xb8/0x480 fs/hfsplus/bitmap.c:182 stack backtrace: CPU: 0 PID: 4960 Comm: syz.3.151 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/02/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+0x157c/0x6610 kernel/locking/lockdep.c:-1 lock_acquire+0x20c/0x638 kernel/locking/lockdep.c:5662 __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_get_block+0x2b0/0x11a0 fs/hfsplus/extents.c:260 block_read_full_folio+0x2e8/0x980 fs/buffer.c:2271 hfsplus_read_folio+0x28/0x38 fs/hfsplus/inode.c:28 filemap_read_folio+0x134/0x384 mm/filemap.c:2490 do_read_cache_folio+0x24c/0x534 mm/filemap.c:3659 do_read_cache_page mm/filemap.c:3701 [inline] read_cache_page+0x6c/0x184 mm/filemap.c:3710 read_mapping_page include/linux/pagemap.h:793 [inline] hfsplus_block_free+0x10c/0x480 fs/hfsplus/bitmap.c:185 hfsplus_free_extents+0x10c/0x884 fs/hfsplus/extents.c:360 hfsplus_file_truncate+0x600/0x9a4 fs/hfsplus/extents.c:589 hfsplus_setattr+0x190/0x25c fs/hfsplus/inode.c:289 notify_change+0xb5c/0xe20 fs/attr.c:499 do_truncate+0x188/0x20c fs/open.c:65 handle_truncate fs/namei.c:3293 [inline] do_open fs/namei.c:3638 [inline] path_openat+0x21c8/0x27a0 fs/namei.c:3791 do_filp_open+0x198/0x38c fs/namei.c:3818 do_sys_openat2+0x134/0x3fc fs/open.c:1320 do_sys_open fs/open.c:1336 [inline] __do_sys_openat fs/open.c:1352 [inline] __se_sys_openat fs/open.c:1347 [inline] __arm64_sys_openat+0x11c/0x150 fs/open.c:1347 __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 hfsplus: unable to mark blocks free: error -5 hfsplus: can't free extent