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>] [day] [month] [year] [list]
Message-ID: <20201221130343.1862-1-zhengyongjun3@huawei.com>
Date:   Mon, 21 Dec 2020 21:03:43 +0800
From:   Zheng Yongjun <zhengyongjun3@...wei.com>
To:     <keescook@...omium.org>, <anton@...msg.org>, <ccross@...roid.com>,
        <tony.luck@...el.com>, <linux-kernel@...r.kernel.org>
CC:     Zheng Yongjun <zhengyongjun3@...wei.com>
Subject: [PATCH -next] fs/pstore: Add missing unlock to avoid mismatched lock

Fix a missing unlock in the error branch.

Signed-off-by: Zheng Yongjun <zhengyongjun3@...wei.com>
---
 fs/pstore/zone.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/pstore/zone.c b/fs/pstore/zone.c
index 3ce89216670c..569404d56db0 100644
--- a/fs/pstore/zone.c
+++ b/fs/pstore/zone.c
@@ -1403,6 +1403,7 @@ int register_pstore_zone(struct pstore_zone_info *info)
 		goto fail_free;
 	}
 	mutex_unlock(&pstore_zone_cxt.pstore_zone_info_lock);
+	mutex_unlock(&cxt->pstore_zone_info_lock);
 
 	return 0;
 
@@ -1414,6 +1415,7 @@ int register_pstore_zone(struct pstore_zone_info *info)
 fail_out:
 	pstore_zone_cxt.pstore_zone_info = NULL;
 	mutex_unlock(&pstore_zone_cxt.pstore_zone_info_lock);
+	mutex_unlock(&cxt->pstore_zone_info_lock);
 	return err;
 }
 EXPORT_SYMBOL_GPL(register_pstore_zone);
-- 
2.22.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ