Re: [PATCH] ext4: implement filesystem specific alloc_inode in unit test

From: Guenter Roeck
Date: Sat Apr 27 2024 - 15:09:55 EST


Hi,

On Sat, Mar 23, 2024 at 12:55:18AM +0800, Kemeng Shi wrote:
> We expect inode with ext4_info_info type as following:
> mbt_kunit_init
> mbt_mb_init
> ext4_mb_init
> ext4_mb_init_backend
> sbi->s_buddy_cache = new_inode(sb);
> EXT4_I(sbi->s_buddy_cache)->i_disksize = 0;
>
> Implement alloc_inode ionde with ext4_inode_info type to avoid
> out-of-bounds write.
>
> Signed-off-by: Kemeng Shi <shikemeng@xxxxxxxxxxxxxxx>
> Reported-by: Guenter Roeck <linux@xxxxxxxxxxxx>
> ---

Ths problem fixed by this patch still affects the mainline kernel,
and is often fatal there if CONFIG_EXT4_KUNIT_TESTS is enabled
due to memory corruptions. Is there a chance to get it applied soon,
or should I just disable CONFIG_EXT4_KUNIT_TESTS for good ?

Thanks,
Guenter