hfsplus: new node 0 already hashed? ------------[ cut here ]------------ WARNING: CPU: 1 PID: 7081 at fs/hfsplus/bnode.c:573 hfsplus_bnode_create+0x430/0x4e4 fs/hfsplus/bnode.c:572 Modules linked in: CPU: 1 UID: 0 PID: 7081 Comm: syz.2.82 Not tainted 6.11.0-rc5-syzkaller-gdf54f4a16f82 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : hfsplus_bnode_create+0x430/0x4e4 fs/hfsplus/bnode.c:572 lr : hfsplus_bnode_create+0x430/0x4e4 fs/hfsplus/bnode.c:572 sp : ffff80009c766c50 x29: ffff80009c766c60 x28: dfff800000000000 x27: dfff800000000000 x26: ffff0000ddfd60f8 x25: dfff800000000000 x24: ffff0000f65d3388 x23: 0000000000000000 x22: ffff0000e4a0e0e0 x21: ffff0000e4a0e000 x20: 0000000000000000 x19: ffff0000f65d3300 x18: 1fffe0003679e7e6 x17: ffff80008f50d000 x16: ffff800080345a84 x15: 0000000000000001 x14: 1fffe000367a12c8 x13: 0000000000000000 x12: 0000000000000003 x11: 0000000000040000 x10: 0000000000018908 x9 : 7af5716c6c556d00 x8 : 7af5716c6c556d00 x7 : ffff8000802b6694 x6 : 0000000000000000 x5 : 0000000000000001 x4 : 0000000000000001 x3 : 0000000000000000 x2 : 0000000000000006 x1 : 0000000100000000 x0 : 0000000000000023 Call trace: hfsplus_bnode_create+0x430/0x4e4 fs/hfsplus/bnode.c:572 hfsplus_bmap_alloc+0x578/0x640 fs/hfsplus/btree.c:415 hfs_btree_inc_height+0xf8/0xa60 fs/hfsplus/brec.c:475 hfsplus_brec_insert+0x11c/0xaa0 fs/hfsplus/brec.c:75 __hfsplus_ext_write_extent+0x288/0x4ac fs/hfsplus/extents.c:107 __hfsplus_ext_cache_extent+0x84/0xa84 fs/hfsplus/extents.c:186 hfsplus_ext_read_extent fs/hfsplus/extents.c:218 [inline] hfsplus_file_extend+0x39c/0x1544 fs/hfsplus/extents.c:462 hfsplus_get_block+0x398/0x1168 fs/hfsplus/extents.c:245 __block_write_begin_int+0x580/0x166c fs/buffer.c:2125 __block_write_begin fs/buffer.c:2174 [inline] block_write_begin fs/buffer.c:2235 [inline] cont_write_begin+0x79c/0xc40 fs/buffer.c:2587 hfsplus_write_begin+0x98/0xe4 fs/hfsplus/inode.c:47 cont_expand_zero fs/buffer.c:2514 [inline] cont_write_begin+0x2d8/0xc40 fs/buffer.c:2577 hfsplus_write_begin+0x98/0xe4 fs/hfsplus/inode.c:47 generic_cont_expand_simple+0x160/0x258 fs/buffer.c:2478 hfsplus_setattr+0x140/0x24c fs/hfsplus/inode.c:259 notify_change+0x9d4/0xc84 fs/attr.c:495 do_truncate fs/open.c:65 [inline] do_ftruncate+0x3e4/0x4cc fs/open.c:181 do_sys_ftruncate fs/open.c:199 [inline] __do_sys_ftruncate fs/open.c:207 [inline] __se_sys_ftruncate fs/open.c:205 [inline] __arm64_sys_ftruncate+0x94/0xec fs/open.c:205 __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+0x54/0x168 arch/arm64/kernel/entry-common.c:712 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598 irq event stamp: 12496 hardirqs last enabled at (12495): [] raw_spin_rq_unlock_irq kernel/sched/sched.h:1427 [inline] hardirqs last enabled at (12495): [] finish_lock_switch+0xbc/0x1e4 kernel/sched/core.c:4942 hardirqs last disabled at (12496): [] el1_dbg+0x24/0x80 arch/arm64/kernel/entry-common.c:470 softirqs last enabled at (11982): [] local_bh_enable+0x10/0x34 include/linux/bottom_half.h:32 softirqs last disabled at (11980): [] local_bh_disable+0x10/0x34 include/linux/bottom_half.h:19 ---[ end trace 0000000000000000 ]--- ------------[ cut here ]------------ kernel BUG at fs/hfsplus/bnode.c:618! Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP Modules linked in: CPU: 1 UID: 0 PID: 7081 Comm: syz.2.82 Tainted: G W 6.11.0-rc5-syzkaller-gdf54f4a16f82 #0 Tainted: [W]=WARN Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : hfsplus_bnode_put+0x488/0x494 fs/hfsplus/bnode.c:618 lr : hfsplus_bnode_put+0x488/0x494 fs/hfsplus/bnode.c:618 sp : ffff80009c766d40 x29: ffff80009c766d40 x28: dfff800000000000 x27: ffff7000138ecdc0 x26: 1fffe0001c941c03 x25: 1fffe0001ecba660 x24: ffff0000e4a0e000 x23: dfff800000000000 x22: ffff0000f65d3300 x21: ffff0000f65d3380 x20: 0000000000000000 x19: ffff0000f65d3300 x18: 1fffe0003679e7e6 x17: ffff80008f50d000 x16: ffff80008029add0 x15: 0000000000000001 x14: 1fffe0001ecba670 x13: 0000000000000000 x12: 0000000000000000 x11: 0000000000040000 x10: 00000000000386cf x9 : ffff8000a0f19000 x8 : 00000000000386d0 x7 : ffff800080c6caa8 x6 : 0000000000000000 x5 : 0000000000000000 x4 : 0000000000000001 x3 : ffff8000811cc71c x2 : 0000000000000000 x1 : 0000000000000000 x0 : 0000000000000000 Call trace: hfsplus_bnode_put+0x488/0x494 fs/hfsplus/bnode.c:618 hfs_btree_inc_height+0x4fc/0xa60 fs/hfsplus/brec.c:530 hfsplus_brec_insert+0x11c/0xaa0 fs/hfsplus/brec.c:75 __hfsplus_ext_write_extent+0x288/0x4ac fs/hfsplus/extents.c:107 __hfsplus_ext_cache_extent+0x84/0xa84 fs/hfsplus/extents.c:186 hfsplus_ext_read_extent fs/hfsplus/extents.c:218 [inline] hfsplus_file_extend+0x39c/0x1544 fs/hfsplus/extents.c:462 hfsplus_get_block+0x398/0x1168 fs/hfsplus/extents.c:245 __block_write_begin_int+0x580/0x166c fs/buffer.c:2125 __block_write_begin fs/buffer.c:2174 [inline] block_write_begin fs/buffer.c:2235 [inline] cont_write_begin+0x79c/0xc40 fs/buffer.c:2587 hfsplus_write_begin+0x98/0xe4 fs/hfsplus/inode.c:47 cont_expand_zero fs/buffer.c:2514 [inline] cont_write_begin+0x2d8/0xc40 fs/buffer.c:2577 hfsplus_write_begin+0x98/0xe4 fs/hfsplus/inode.c:47 generic_cont_expand_simple+0x160/0x258 fs/buffer.c:2478 hfsplus_setattr+0x140/0x24c fs/hfsplus/inode.c:259 notify_change+0x9d4/0xc84 fs/attr.c:495 do_truncate fs/open.c:65 [inline] do_ftruncate+0x3e4/0x4cc fs/open.c:181 do_sys_ftruncate fs/open.c:199 [inline] __do_sys_ftruncate fs/open.c:207 [inline] __se_sys_ftruncate fs/open.c:205 [inline] __arm64_sys_ftruncate+0x94/0xec fs/open.c:205 __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+0x54/0x168 arch/arm64/kernel/entry-common.c:712 el0t_64_sync_handler+0x84/0xfc arch/arm64/kernel/entry-common.c:730 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:598 Code: aa1403e0 97e2e623 17ffffb7 97ce6de5 (d4210000) ---[ end trace 0000000000000000 ]---