lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 25 Jan 2022 18:06:04 +0500
From:   Ameer Hamza <amhamza.mgc@...il.com>
To:     tytso@....edu, adilger.kernel@...ger.ca
Cc:     linux-ext4@...r.kernel.org, linux-kernel@...r.kernel.org,
        amhamza.mgc@...il.com
Subject: [PATCH] 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 <amhamza.mgc@...il.com>
---
 fs/ext4/super.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 57914acc5402..0dccf1ed931b 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -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;
 
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ