mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 01:10:04 +00:00
ext4: return error code when ext4_fill_flex_info() fails
After commitc89128a008
("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:c89128a008
("ext4: handle errors on ext4_commit_super") Reported-by: Hulk Robot <hulkci@huawei.com> Cc: <stable@vger.kernel.org> # v4.18+ Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20210510111051.55650-1-yangyingliang@huawei.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
parent
b9a037b7f3
commit
8f6840c4fd
1 changed files with 1 additions and 0 deletions
|
@ -5065,6 +5065,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
|
||||||
ext4_msg(sb, KERN_ERR,
|
ext4_msg(sb, KERN_ERR,
|
||||||
"unable to initialize "
|
"unable to initialize "
|
||||||
"flex_bg meta info!");
|
"flex_bg meta info!");
|
||||||
|
ret = -ENOMEM;
|
||||||
goto failed_mount6;
|
goto failed_mount6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue