All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] fs/pstore: Add missing unlock to avoid mismatched lock
@ 2020-12-21 13:03 Zheng Yongjun
  0 siblings, 0 replies; only message in thread
From: Zheng Yongjun @ 2020-12-21 13:03 UTC (permalink / raw)
  To: keescook, anton, ccross, tony.luck, linux-kernel; +Cc: Zheng Yongjun

Fix a missing unlock in the error branch.

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-12-21 13:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-21 13:03 [PATCH -next] fs/pstore: Add missing unlock to avoid mismatched lock Zheng Yongjun

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.