hfsplus: invalid extended attribute record ============================================ WARNING: possible recursive locking detected syzkaller #0 Not tainted -------------------------------------------- syz.1.10/4457 is trying to acquire lock: ffff0000dced1548 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_get_block+0x2bc/0x1154 fs/hfsplus/extents.c:260 but task is already holding lock: ffff0000dced3048 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_truncate+0x20c/0x970 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 3 locks held by syz.1.10/4457: #0: ffff0000dced3240 (&sb->s_type->i_mutex_key#20){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:758 [inline] #0: ffff0000dced3240 (&sb->s_type->i_mutex_key#20){+.+.}-{3:3}, at: hfsplus_file_release+0xd8/0x3a4 fs/hfsplus/inode.c:237 #1: ffff0000dced3048 (&HFSPLUS_I(inode)->extents_lock){+.+.}-{3:3}, at: hfsplus_file_truncate+0x20c/0x970 fs/hfsplus/extents.c:574 #2: ffff0000f79b40f8 (&sbi->alloc_mutex){+.+.}-{3:3}, at: hfsplus_block_free+0xb8/0x47c fs/hfsplus/bitmap.c:182 stack backtrace: CPU: 0 PID: 4457 Comm: syz.1.10 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/03/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: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+0x108/0x47c fs/hfsplus/bitmap.c:185 hfsplus_free_extents+0x10c/0x880 fs/hfsplus/extents.c:360 hfsplus_file_truncate+0x5e0/0x970 fs/hfsplus/extents.c:589 hfsplus_delete_inode fs/hfsplus/inode.c:-1 [inline] hfsplus_file_release+0x2a8/0x3a4 fs/hfsplus/inode.c:242 __fput+0x1bc/0x7c0 fs/file_table.c:320 ____fput+0x20/0x30 fs/file_table.c:348 task_work_run+0x1ec/0x270 kernel/task_work.c:203 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] do_notify_resume+0x2038/0x2b28 arch/arm64/kernel/signal.c:1137 prepare_exit_to_user_mode arch/arm64/kernel/entry-common.c:137 [inline] exit_to_user_mode arch/arm64/kernel/entry-common.c:142 [inline] el0_svc+0x98/0x138 arch/arm64/kernel/entry-common.c:638 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