Hello,
syzbot has tested the proposed patch but the reproducer is still triggering an issue:
WARNING in hfs_bnode_create
hfs: new node 0 already hashed?
------------[ cut here ]------------
1
WARNING: fs/hfs/bnode.c:478 at hfs_bnode_create+0x45d/0x4f0 fs/hfs/bnode.c:478, CPU#0: kworker/u8:11/1900
Modules linked in:
CPU: 0 UID: 0 PID: 1900 Comm: kworker/u8:11 Not tainted syzkaller #0 PREEMPT_{RT,(full)}
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/18/2026
Workqueue: writeback wb_workfn (flush-7:0)
RIP: 0010:hfs_bnode_create+0x45d/0x4f0 fs/hfs/bnode.c:478
Code: 67 8b 89 ee e8 84 37 82 fe e9 cf fc ff ff e8 9a 64 1f ff 4c 89 f7 e8 02 92 87 08 48 c7 c7 60 86 67 8b 89 ee e8 64 37 82 fe 90 <0f> 0b 90 49 c7 c5 ef ff ff ff eb a9 44 89 f9 80 e1 07 80 c1 03 38
RSP: 0018:ffffc90007216c60 EFLAGS: 00010246
RAX: 000000000000001f RBX: dffffc0000000000 RCX: fc54bb1d45c9e500
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: dffffc0000000000 R11: fffff52000e42d3d R12: 0000000000000000
R13: ffff88802c352000 R14: ffff88802c3520d0 R15: ffff88802a51b200
FS: 0000000000000000(0000) GS:ffff88812610b000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffccb6b3f30 CR3: 000000002c30c000 CR4: 00000000003526f0
Call Trace:
<TASK>
hfs_bmap_alloc+0x6a0/0xa50 fs/hfs/btree.c:332
hfs_btree_inc_height+0x100/0xad0 fs/hfs/brec.c:490
hfs_brec_insert+0x7ef/0xc90 fs/hfs/brec.c:148
__hfs_ext_write_extent+0x2a1/0x470 fs/hfs/extent.c:124
hfs_ext_write_extent+0x17e/0x210 fs/hfs/extent.c:144
hfs_write_inode+0x117/0x960 fs/hfs/inode.c:459
write_inode fs/fs-writeback.c:1582 [inline]
__writeback_single_inode+0x75d/0x10e0 fs/fs-writeback.c:1825
writeback_sb_inodes+0x97f/0x1980 fs/fs-writeback.c:2054
wb_writeback+0x445/0xb00 fs/fs-writeback.c:2239
wb_do_writeback fs/fs-writeback.c:2386 [inline]
wb_workfn+0x3fd/0xf20 fs/fs-writeback.c:2426
process_one_work kernel/workqueue.c:3302 [inline]
process_scheduled_works+0xb5d/0x1860 kernel/workqueue.c:3385
worker_thread+0xa53/0xfc0 kernel/workqueue.c:3466
kthread+0x388/0x470 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
</TASK>
Tested on:
commit: 8541d8f7 Merge tag 'mtd/for-7.1' of git://git.kernel.o..
git tree: upstream
console output:
https://syzkaller.appspot.com/x/log.txt?x=12a8466a580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=515dd79402eb93db
patch:
https://syzkaller.appspot.com/x/patch.diff?x=11bec1ba580000