hfs: new node 0 already hashed? ------------[ cut here ]------------ WARNING: CPU: 1 PID: 4887 at fs/hfs/bnode.c:422 hfs_bnode_create+0x428/0x4dc fs/hfs/bnode.c:421 Modules linked in: CPU: 1 PID: 4887 Comm: syz.4.115 Tainted: G W 6.1.121-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : hfs_bnode_create+0x428/0x4dc fs/hfs/bnode.c:421 lr : hfs_bnode_create+0x428/0x4dc fs/hfs/bnode.c:421 sp : ffff800021b76af0 x29: ffff800021b76b00 x28: dfff800000000000 x27: dfff800000000000 x26: 000000000000016c x25: ffff0000c3bf2688 x24: 0000000000000000 x23: 0000000000000000 x22: ffff0000d93fa0e0 x21: ffff0000d93fa000 x20: 0000000000000000 x19: ffff0000c3bf2600 x18: 1fffe000367a0176 x17: ffff800015a8d000 x16: ffff80001232c2f4 x15: ffff0001b3d00bbc x14: 1ffff00002b520b2 x13: dfff800000000000 x12: 0000000000000001 x11: 0000000000ff0100 x10: 0000000000000000 x9 : 332a290eba7a5800 x8 : 332a290eba7a5800 x7 : ffff800008278b0c x6 : 0000000000000000 x5 : 0000000000000080 x4 : 0000000000000001 x3 : ffff80000ab388ec x2 : ffff0001b3d00cd0 x1 : 0000000100000000 x0 : 000000000000001f Call trace: hfs_bnode_create+0x428/0x4dc fs/hfs/bnode.c:421 hfs_bmap_alloc+0x59c/0x664 fs/hfs/btree.c:291 hfs_btree_inc_height+0xf8/0x9d0 fs/hfs/brec.c:471 hfs_brec_insert+0x580/0x97c fs/hfs/brec.c:148 __hfs_ext_write_extent+0x240/0x468 fs/hfs/extent.c:124 __hfs_ext_cache_extent+0x84/0x754 fs/hfs/extent.c:174 hfs_ext_read_extent fs/hfs/extent.c:202 [inline] hfs_extend_file+0x29c/0x1130 fs/hfs/extent.c:401 hfs_get_block+0x3b8/0x9e0 fs/hfs/extent.c:353 get_more_blocks fs/direct-io.c:665 [inline] do_direct_IO fs/direct-io.c:953 [inline] __blockdev_direct_IO+0x14cc/0x3ef4 fs/direct-io.c:1266 blockdev_direct_IO include/linux/fs.h:3342 [inline] hfs_direct_IO+0xf4/0x1e0 fs/hfs/inode.c:138 generic_file_direct_write+0x234/0x538 mm/filemap.c:3769 __generic_file_write_iter+0x1bc/0x388 mm/filemap.c:3929 generic_file_write_iter+0xb8/0x2b4 mm/filemap.c:4005 call_write_iter include/linux/fs.h:2265 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x610/0x91c fs/read_write.c:584 ksys_write+0x15c/0x26c fs/read_write.c:637 __do_sys_write fs/read_write.c:649 [inline] __se_sys_write fs/read_write.c:646 [inline] __arm64_sys_write+0x7c/0x90 fs/read_write.c:646 __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/0x168 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 irq event stamp: 2252 hardirqs last enabled at (2251): [] raw_spin_rq_unlock_irq kernel/sched/sched.h:1367 [inline] hardirqs last enabled at (2251): [] finish_lock_switch+0xbc/0x1e8 kernel/sched/core.c:5000 hardirqs last disabled at (2252): [] el1_dbg+0x24/0x80 arch/arm64/kernel/entry-common.c:405 softirqs last enabled at (2186): [] softirq_handle_end kernel/softirq.c:414 [inline] softirqs last enabled at (2186): [] handle_softirqs+0xb84/0xd58 kernel/softirq.c:599 softirqs last disabled at (1937): [] __do_softirq+0x14/0x20 kernel/softirq.c:605 ---[ end trace 0000000000000000 ]--- ------------[ cut here ]------------ kernel BUG at fs/hfs/bnode.c:467! Internal error: Oops - BUG: 00000000f2000800 [#1] PREEMPT SMP Modules linked in: CPU: 1 PID: 4887 Comm: syz.4.115 Tainted: G W 6.1.121-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 pstate: 80400005 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : hfs_bnode_put+0x318/0x324 fs/hfs/bnode.c:467 lr : hfs_bnode_put+0x318/0x324 fs/hfs/bnode.c:467 sp : ffff800021b76c10 x29: ffff800021b76c10 x28: dfff800000000000 x27: ffff70000436ed98 x26: 1fffe0001b27f403 x25: 0000000000000200 x24: 1fffe0001877e4c0 x23: dfff800000000000 x22: ffff0000d93fa000 x21: ffff0000c3bf2680 x20: 0000000000000000 x19: ffff0000c3bf2600 x18: 1fffe000367a0176 x17: ffff800015a8d000 x16: ffff80001232c424 x15: ffff0001b3d00bbc x14: 1ffff00002b520b2 x13: dfff800000000000 x12: 0000000000000001 x11: 0000000000ff0100 x10: 0000000000000000 x9 : ffff8000090a76b4 x8 : ffff0000d3db1bc0 x7 : ffff8000089d7b9c x6 : 0000000000000000 x5 : 0000000000000000 x4 : 0000000000000000 x3 : ffff8000090a73f4 x2 : 0000000000000000 x1 : 0000000000000000 x0 : 0000000000000000 Call trace: hfs_bnode_put+0x318/0x324 fs/hfs/bnode.c:467 hfs_btree_inc_height+0x4c0/0x9d0 fs/hfs/brec.c:525 hfs_brec_insert+0x580/0x97c fs/hfs/brec.c:148 __hfs_ext_write_extent+0x240/0x468 fs/hfs/extent.c:124 __hfs_ext_cache_extent+0x84/0x754 fs/hfs/extent.c:174 hfs_ext_read_extent fs/hfs/extent.c:202 [inline] hfs_extend_file+0x29c/0x1130 fs/hfs/extent.c:401 hfs_get_block+0x3b8/0x9e0 fs/hfs/extent.c:353 get_more_blocks fs/direct-io.c:665 [inline] do_direct_IO fs/direct-io.c:953 [inline] __blockdev_direct_IO+0x14cc/0x3ef4 fs/direct-io.c:1266 blockdev_direct_IO include/linux/fs.h:3342 [inline] hfs_direct_IO+0xf4/0x1e0 fs/hfs/inode.c:138 generic_file_direct_write+0x234/0x538 mm/filemap.c:3769 __generic_file_write_iter+0x1bc/0x388 mm/filemap.c:3929 generic_file_write_iter+0xb8/0x2b4 mm/filemap.c:4005 call_write_iter include/linux/fs.h:2265 [inline] new_sync_write fs/read_write.c:491 [inline] vfs_write+0x610/0x91c fs/read_write.c:584 ksys_write+0x15c/0x26c fs/read_write.c:637 __do_sys_write fs/read_write.c:649 [inline] __se_sys_write fs/read_write.c:646 [inline] __arm64_sys_write+0x7c/0x90 fs/read_write.c:646 __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/0x168 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 Code: aa1503e0 97e341a0 17ffffd5 97d132b3 (d4210000) ---[ end trace 0000000000000000 ]---