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

From: Guenter Roeck
Date: Fri Mar 22 2024 - 11:43:17 EST


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>

Tested-by: Guenter Roeck <linux@xxxxxxxxxxxx>

Guenter