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]
Message-ID: <20210628111450.194262-1-jingxiangfeng@huawei.com>
Date:   Mon, 28 Jun 2021 19:14:50 +0800
From:   Jing Xiangfeng <jingxiangfeng@...wei.com>
To:     <rpeterso@...hat.com>, <agruenba@...hat.com>, <adas@...hat.com>
CC:     <cluster-devel@...hat.com>, <linux-kernel@...r.kernel.org>,
        <jingxiangfeng@...wei.com>
Subject: [PATCH] gfs2: Fix error handling in init_statfs()

In an error path of init_statfs(), it calls iput to put pn which has been
put. Jump to correct label to fix it.

Fixes: 97fd734ba17e ("gfs2: lookup local statfs inodes prior to journal recovery")
Signed-off-by: Jing Xiangfeng <jingxiangfeng@...wei.com>
---
 fs/gfs2/ops_fstype.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c
index 826f77d9cff5..e9ebab1af62f 100644
--- a/fs/gfs2/ops_fstype.c
+++ b/fs/gfs2/ops_fstype.c
@@ -692,7 +692,8 @@ static int init_statfs(struct gfs2_sbd *sdp)
 				   &sdp->sd_sc_gh);
 	if (error) {
 		fs_err(sdp, "can't lock local \"sc\" file: %d\n", error);
-		goto free_local;
+		free_local_statfs_inodes(sdp);
+		goto put_statfs;
 	}
 	return 0;
 
-- 
2.26.0.106.g9fadedd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ