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

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