ext4: handle unsuccessful sbi allocation
PATCH 1/1 ext4: handle unsuccessful sbi allocation
Move to common fail path in case of unsuccessful sbi allocation
Addresses-Coverity: 1497833 ("Unused value")
Signed-off-by Ameer Hamza <[email protected]>
--- fs/ext4/super.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
fs/ext4/super.c +3 -1
@@ -5540,8 +5540,10 @@ static int ext4_fill_super(struct super_block *sb, struct fs_context *fc)int ret; sbi =ext4_alloc_sbi (sb); -if (!sbi) +if (!sbi) { ret = -ENOMEM ; + goto free_sbi; + } fc->s_fs_info = sbi;
Signature · 1 line
2.25.1
We already have a patch to fix the problem on this list
https://lore.kernel.org/linux-ext4/[email protected]/T/#u
-Lukas
Quoted 28 lines · Ameer Hamza
Move to common fail path in case of unsuccessful sbi allocation
Addresses-Coverity: 1497833 ("Unused value")
Signed-off-by Ameer Hamza <[email protected]>--- fs/ext4/super.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)fs/ext4/super.c +3
-1@@ -5540,8 +5540,10 @@ static int ext4_fill_super(struct super_block *sb, struct fs_context *fc)int ret; sbi =ext4_alloc_sbi (sb); -if (!sbi) +if (!sbi) { ret = -ENOMEM ; + goto free_sbi; + } fc->s_fs_info = sbi;Signature · 1 line
2.25.1