Re: [PATCH] ext4: return error code when ext4_fill_flex_info() fails

From: Theodore Ts'o
Date: Thu Jun 17 2021 - 10:52:44 EST


On Mon, May 10, 2021 at 07:10:51PM +0800, Yang Yingliang wrote:
> After commit c89128a00838 ("ext4: handle errors on ext4_commit_super"), 'ret' may
> be set to 0 before calling ext4_fill_flex_info(), if ext4_fill_flex_info() fails
> ext4_mount() doesn't return error code, it makes 'root' is null which causes
> crash in legacy_get_tree().
>
> Fixes: c89128a00838 ("ext4: handle errors on ext4_commit_super")
> Reported-by: Hulk Robot <hulkci@xxxxxxxxxx>
> Cc: <stable@xxxxxxxxxxxxxxx> # v4.18+
> Signed-off-by: Yang Yingliang <yangyingliang@xxxxxxxxxx>

Applied, thanks.

- Ted