loop4: detected capacity change from 0 to 1024 ============================================ WARNING: possible recursive locking detected 6.1.148-syzkaller #0 Not tainted -------------------------------------------- syz.4.5/4459 is trying to acquire lock: ffff0000f8581548 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_get_block+0x2bc/0x1154 fs/hfsplus/extents.c:260 but task is already holding lock: ffff0000f85807c8 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_extend+0x180/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 5 locks held by syz.4.5/4459: #0: ffff0000f85780e0 (&type->s_umount_key#50/1){+.+.}-{3:3}, at: alloc_super+0x1a4/0x804 fs/super.c:228 #1: ffff0000f8570998 (&sbi->vh_mutex){+.+.}-{3:3}, at: hfsplus_fill_super+0xf2c/0x16c0 fs/hfsplus/super.c:553 #2: ffff0000f857c0b0 (&tree->tree_lock){+.+.}-{3:3}, at: hfsplus_find_init+0x144/0x1bc fs/hfsplus/bfind.c:28 #3: ffff0000f85807c8 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_extend+0x180/0x1324 fs/hfsplus/extents.c:455 #4: ffff0000f85708f8 (&sbi->alloc_mutex){+.+.}-{3:3}, at: hfsplus_block_allocate+0x88/0x7d8 fs/hfsplus/bitmap.c:35 stack backtrace: CPU: 1 PID: 4459 Comm: syz.4.5 Not tainted 6.1.148-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/30/2025 Call trace: dump_backtrace+0x1c8/0x1f4 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+0xf8/0x160 lib/dump_stack.c:106 dump_stack+0x1c/0x5c lib/dump_stack.c:113 __lock_acquire+0x18b4/0x6544 kernel/locking/lockdep.c:-1 lock_acquire+0x20c/0x644 kernel/locking/lockdep.c:5662 __mutex_lock_common+0x190/0x1f38 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+0x2bc/0x1154 fs/hfsplus/extents.c:260 block_read_full_folio+0x2e4/0x97c fs/buffer.c:2271 hfsplus_read_folio+0x28/0x38 fs/hfsplus/inode.c:28 filemap_read_folio+0x130/0x37c mm/filemap.c:2490 do_read_cache_folio+0x24c/0x544 mm/filemap.c:3627 do_read_cache_page mm/filemap.c:3669 [inline] read_cache_page+0x6c/0x184 mm/filemap.c:3678 read_mapping_page include/linux/pagemap.h:791 [inline] hfsplus_block_allocate+0xdc/0x7d8 fs/hfsplus/bitmap.c:37 hfsplus_file_extend+0x73c/0x1324 fs/hfsplus/extents.c:466 hfsplus_bmap_reserve+0xe8/0x494 fs/hfsplus/btree.c:358 hfsplus_create_cat+0x170/0xdd4 fs/hfsplus/catalog.c:272 hfsplus_fill_super+0xf88/0x16c0 fs/hfsplus/super.c:560 mount_bdev+0x264/0x358 fs/super.c:1443 hfsplus_mount+0x44/0x58 fs/hfsplus/super.c:641 legacy_get_tree+0xd4/0x16c fs/fs_context.c:632 vfs_get_tree+0x90/0x274 fs/super.c:1573 do_new_mount+0x228/0x810 fs/namespace.c:3063 path_mount+0x5b4/0xe78 fs/namespace.c:3393 do_mount fs/namespace.c:3406 [inline] __do_sys_mount fs/namespace.c:3614 [inline] __se_sys_mount fs/namespace.c:3591 [inline] __arm64_sys_mount+0x49c/0x584 fs/namespace.c:3591 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline] invoke_syscall+0x98/0x2bc arch/arm64/kernel/syscall.c:52 el0_svc_common+0x138/0x258 arch/arm64/kernel/syscall.c:140 do_el0_svc+0x58/0x13c arch/arm64/kernel/syscall.c:204 el0_svc+0x58/0x138 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