hfsplus: new node 0 already hashed? ------------[ cut here ]------------ WARNING: CPU: 0 PID: 7021 at fs/hfsplus/bnode.c:579 hfsplus_bnode_create+0x384/0x430 fs/hfsplus/bnode.c:578 Modules linked in: CPU: 0 UID: 0 PID: 7021 Comm: syz.3.79 Not tainted 6.15.0-rc5-syzkaller-gc32f8dc5aaf9 #0 PREEMPT Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : hfsplus_bnode_create+0x384/0x430 fs/hfsplus/bnode.c:578 lr : hfsplus_bnode_create+0x384/0x430 fs/hfsplus/bnode.c:578 sp : ffff8000a4e36c10 x29: ffff8000a4e36c20 x28: 1ffff000149c6d90 x27: dfff800000000000 x26: 0000000000000000 x25: 0000000000000080 x24: 0000000000000000 x23: ffff0000f6c250f8 x22: 0000000000000000 x21: 0000000000000000 x20: ffff0000d7ed8000 x19: ffff0000d1b79500 x18: 00000000ffffffff x17: ffff800092f27000 x16: ffff80008adb410c x15: 0000000000000001 x14: 1ffff000149c6cec x13: 0000000000000000 x12: 0000000000000000 x11: 0000000000080000 x10: 0000000000027fe2 x9 : 8a8972e649125500 x8 : 8a8972e649125500 x7 : 0000000000000001 x6 : 0000000000000001 x5 : ffff8000a4e36598 x4 : ffff80008f405b40 x3 : ffff800082fb6764 x2 : 0000000000000001 x1 : 0000000100000000 x0 : 0000000000000023 Call trace: hfsplus_bnode_create+0x384/0x430 fs/hfsplus/bnode.c:578 (P) hfsplus_bmap_alloc+0x43c/0x4cc fs/hfsplus/btree.c:415 hfs_btree_inc_height+0xf8/0x8e0 fs/hfsplus/brec.c:475 hfsplus_brec_insert+0x108/0xaa8 fs/hfsplus/brec.c:75 __hfsplus_ext_write_extent+0x278/0x4cc fs/hfsplus/extents.c:107 __hfsplus_ext_cache_extent+0x84/0xa88 fs/hfsplus/extents.c:186 hfsplus_ext_read_extent fs/hfsplus/extents.c:218 [inline] hfsplus_file_extend+0x37c/0x1388 fs/hfsplus/extents.c:462 hfsplus_get_block+0x314/0x1154 fs/hfsplus/extents.c:245 __block_write_begin_int+0x53c/0x15e8 fs/buffer.c:2151 block_write_begin fs/buffer.c:2262 [inline] cont_write_begin+0x62c/0x968 fs/buffer.c:2601 hfsplus_write_begin+0x7c/0xc4 fs/hfsplus/inode.c:46 cont_expand_zero fs/buffer.c:2528 [inline] cont_write_begin+0x26c/0x968 fs/buffer.c:2591 hfsplus_write_begin+0x7c/0xc4 fs/hfsplus/inode.c:46 generic_cont_expand_simple+0x12c/0x1fc fs/buffer.c:2492 hfsplus_setattr+0x140/0x24c fs/hfsplus/inode.c:258 notify_change+0x9a4/0xc50 fs/attr.c:552 do_truncate+0x178/0x1f0 fs/open.c:65 vfs_truncate+0x398/0x444 fs/open.c:115 do_sys_truncate+0xe4/0x1a8 fs/open.c:138 __do_sys_truncate fs/open.c:150 [inline] __se_sys_truncate fs/open.c:148 [inline] __arm64_sys_truncate+0x5c/0x74 fs/open.c:148 __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/0x17c arch/arm64/kernel/entry-common.c:767 el0t_64_sync_handler+0x78/0x108 arch/arm64/kernel/entry-common.c:786 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 irq event stamp: 165218 hardirqs last enabled at (165217): [] __up_console_sem kernel/printk/printk.c:344 [inline] hardirqs last enabled at (165217): [] __console_unlock+0x70/0xc4 kernel/printk/printk.c:2885 hardirqs last disabled at (165218): [] el1_dbg+0x24/0x80 arch/arm64/kernel/entry-common.c:511 softirqs last enabled at (164200): [] local_bh_enable+0x10/0x34 include/linux/bottom_half.h:32 softirqs last disabled at (164198): [] local_bh_disable+0x10/0x34 include/linux/bottom_half.h:19 ---[ end trace 0000000000000000 ]--- ------------[ cut here ]------------ kernel BUG at fs/hfsplus/bnode.c:624! Internal error: Oops - BUG: 00000000f2000800 [#1] SMP Modules linked in: CPU: 1 UID: 0 PID: 7021 Comm: syz.3.79 Tainted: G W 6.15.0-rc5-syzkaller-gc32f8dc5aaf9 #0 PREEMPT Tainted: [W]=WARN Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : hfsplus_bnode_put+0x490/0x49c fs/hfsplus/bnode.c:624 lr : hfsplus_bnode_put+0x490/0x49c fs/hfsplus/bnode.c:624 sp : ffff8000a4e36ce0 x29: ffff8000a4e36ce0 x28: 0000000000000000 x27: dfff800000000000 x26: ffff7000149c6db0 x25: ffff8000a4e36d80 x24: 1fffe0001a36f2a0 x23: ffff0000d7ed8000 x22: dfff800000000000 x21: 0000000000000000 x20: ffff0000d1b79580 x19: ffff0000d1b79500 x18: 00000000ffffffff x17: ffff800092f27000 x16: ffff800080525898 x15: 0000000000000001 x14: 1fffe0001a36f2b0 x13: 0000000000000000 x12: 0000000000000000 x11: 0000000000080000 x10: 000000000004cb16 x9 : ffff8000a63ee000 x8 : 000000000004cb17 x7 : ffff800080e0da48 x6 : 0000000000000000 x5 : 0000000000000000 x4 : 0000000000000001 x3 : ffff800081284db8 x2 : 0000000000000000 x1 : 0000000000000000 x0 : 0000000000000000 Call trace: hfsplus_bnode_put+0x490/0x49c fs/hfsplus/bnode.c:624 (P) hfs_btree_inc_height+0x48c/0x8e0 fs/hfsplus/brec.c:530 hfsplus_brec_insert+0x108/0xaa8 fs/hfsplus/brec.c:75 __hfsplus_ext_write_extent+0x278/0x4cc fs/hfsplus/extents.c:107 __hfsplus_ext_cache_extent+0x84/0xa88 fs/hfsplus/extents.c:186 hfsplus_ext_read_extent fs/hfsplus/extents.c:218 [inline] hfsplus_file_extend+0x37c/0x1388 fs/hfsplus/extents.c:462 hfsplus_get_block+0x314/0x1154 fs/hfsplus/extents.c:245 __block_write_begin_int+0x53c/0x15e8 fs/buffer.c:2151 block_write_begin fs/buffer.c:2262 [inline] cont_write_begin+0x62c/0x968 fs/buffer.c:2601 hfsplus_write_begin+0x7c/0xc4 fs/hfsplus/inode.c:46 cont_expand_zero fs/buffer.c:2528 [inline] cont_write_begin+0x26c/0x968 fs/buffer.c:2591 hfsplus_write_begin+0x7c/0xc4 fs/hfsplus/inode.c:46 generic_cont_expand_simple+0x12c/0x1fc fs/buffer.c:2492 hfsplus_setattr+0x140/0x24c fs/hfsplus/inode.c:258 notify_change+0x9a4/0xc50 fs/attr.c:552 do_truncate+0x178/0x1f0 fs/open.c:65 vfs_truncate+0x398/0x444 fs/open.c:115 do_sys_truncate+0xe4/0x1a8 fs/open.c:138 __do_sys_truncate fs/open.c:150 [inline] __se_sys_truncate fs/open.c:148 [inline] __arm64_sys_truncate+0x5c/0x74 fs/open.c:148 __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/0x17c arch/arm64/kernel/entry-common.c:767 el0t_64_sync_handler+0x78/0x108 arch/arm64/kernel/entry-common.c:786 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 Code: aa1403e0 97e67e61 17ffffb4 97d24078 (d4210000) ---[ end trace 0000000000000000 ]---