============================================ WARNING: possible recursive locking detected 6.17.0-rc1-syzkaller-g8f5ae30d69d7 #0 Not tainted -------------------------------------------- syz.0.101/7273 is trying to acquire lock: ffff000109884488 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{4:4}, at: hfsplus_get_block+0x2bc/0x1154 fs/hfsplus/extents.c:260 but task is already holding lock: ffff000109885208 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{4:4}, at: hfsplus_file_extend+0x1b8/0x1388 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 3 locks held by syz.0.101/7273: #0: ffff0001098853f8 (&sb->s_type->i_mutex_key#27){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:869 [inline] #0: ffff0001098853f8 (&sb->s_type->i_mutex_key#27){+.+.}-{4:4}, at: generic_file_write_iter+0xdc/0x47c mm/filemap.c:4315 #1: ffff000109885208 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{4:4}, at: hfsplus_file_extend+0x1b8/0x1388 fs/hfsplus/extents.c:455 #2: ffff0000c777a0f8 (&sbi->alloc_mutex){+.+.}-{4:4}, at: hfsplus_block_allocate+0x88/0x70c fs/hfsplus/bitmap.c:35 stack backtrace: CPU: 1 UID: 0 PID: 7273 Comm: syz.0.101 Not tainted 6.17.0-rc1-syzkaller-g8f5ae30d69d7 #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/0x24ac 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+0x2bc/0x1154 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:2413 do_read_cache_folio+0x364/0x5bc mm/filemap.c:3957 do_read_cache_page mm/filemap.c:4023 [inline] read_cache_page+0x6c/0x160 mm/filemap.c:4032 read_mapping_page include/linux/pagemap.h:985 [inline] hfsplus_block_allocate+0xdc/0x70c fs/hfsplus/bitmap.c:37 hfsplus_file_extend+0x770/0x1388 fs/hfsplus/extents.c:466 hfsplus_get_block+0x314/0x1154 fs/hfsplus/extents.c:245 get_more_blocks fs/direct-io.c:648 [inline] do_direct_IO fs/direct-io.c:936 [inline] __blockdev_direct_IO+0x10bc/0x2818 fs/direct-io.c:1243 blockdev_direct_IO include/linux/fs.h:3506 [inline] hfsplus_direct_IO+0xf0/0x1d0 fs/hfsplus/inode.c:131 generic_file_direct_write+0x1a8/0x350 mm/filemap.c:4109 __generic_file_write_iter+0x10c/0x204 mm/filemap.c:4278 generic_file_write_iter+0x10c/0x47c mm/filemap.c:4318 aio_write+0x328/0x49c fs/aio.c:1634 __io_submit_one fs/aio.c:-1 [inline] io_submit_one+0x5e0/0xf10 fs/aio.c:2053 __do_sys_io_submit fs/aio.c:2112 [inline] __se_sys_io_submit fs/aio.c:2082 [inline] __arm64_sys_io_submit+0x21c/0x38c fs/aio.c:2082 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 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+0x58/0x180 arch/arm64/kernel/entry-common.c:879 el0t_64_sync_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:898 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596