Blame SOURCES/autofs-5.1.7-fix-missing-lock-release-in-mount_subtree.patch

96dc52
autofs-5.1.7 - fix missing lock release in mount_subtree()
96dc52
96dc52
From: Ian Kent <raven@themaw.net>
96dc52
96dc52
Covarity: missing_unlock: Returning without unlocking "mc->rwlock".
96dc52
96dc52
Signed-off-by: Ian Kent <raven@themaw.net>
96dc52
---
96dc52
 CHANGELOG           |    1 +
96dc52
 modules/parse_sun.c |    1 +
96dc52
 2 files changed, 2 insertions(+)
96dc52
96dc52
diff --git a/CHANGELOG b/CHANGELOG
96dc52
index 1d56c96f..ff3d88eb 100644
96dc52
--- a/CHANGELOG
96dc52
+++ b/CHANGELOG
96dc52
@@ -61,6 +61,7 @@
96dc52
 - remove redundant assignment in master_add_amd_mount_section_mounts().
96dc52
 - fix dead code in mnts_add_mount().
96dc52
 - fix arg not used in error print.
96dc52
+- fix missing lock release in mount_subtree().
96dc52
 
96dc52
 25/01/2021 autofs-5.1.7
96dc52
 - make bind mounts propagation slave by default.
96dc52
diff --git a/modules/parse_sun.c b/modules/parse_sun.c
96dc52
index 05f53fc2..5d15f892 100644
96dc52
--- a/modules/parse_sun.c
96dc52
+++ b/modules/parse_sun.c
96dc52
@@ -1105,6 +1105,7 @@ static int mount_subtree(struct autofs_point *ap, struct mapent_cache *mc,
96dc52
 		len = mount_fullpath(key, PATH_MAX, ap->path, ap->len, me->key);
96dc52
 		if (!len) {
96dc52
 			warn(ap->logopt, "path loo long");
96dc52
+			cache_unlock(mc);
96dc52
 			return 1;
96dc52
 		}
96dc52
 		key[len] = '/';