Re: [syzbot] [ocfs2?] KMSAN: uninit-value in _find_next_bit

From: Edward Adam Davis
Date: Sun Mar 23 2025 - 06:31:38 EST


#syz test

diff --git a/fs/ocfs2/quota_local.c b/fs/ocfs2/quota_local.c
index 2956d888c131..a6e8376045b5 100644
--- a/fs/ocfs2/quota_local.c
+++ b/fs/ocfs2/quota_local.c
@@ -307,6 +307,12 @@ static int ocfs2_add_recovery_chunk(struct super_block *sb,
kfree(rc);
return -ENOMEM;
}
+ printk("ents: %u, sb: %p, chunk: %d, blksize: %lu, rcb: %p, inited size: %d, %s\n",
+ ol_chunk_entries(sb), sb, chunk, sb->s_blocksize, rc->rc_bitmap,
+ (ol_chunk_entries(sb) + 7) >> 3, __func__);
+ int bit;
+ for_each_set_bit(bit, (void*)dchunk->dqc_bitmap, ol_chunk_entries(sb));
+ printk("dqc_bitmap inited all chunk entires. %s\n", __func__);
memcpy(rc->rc_bitmap, dchunk->dqc_bitmap,
(ol_chunk_entries(sb) + 7) >> 3);
list_add_tail(&rc->rc_list, head);