Blame SOURCES/autofs-5.1.4-fix-deadlock-in-dumpmaps.patch

aea863
autofs-5.1.4 - fix deadlock in dumpmaps
aea863
aea863
From: Ian Kent <raven@themaw.net>
aea863
aea863
Commit a223d11fa8e (autofs-5.1.3 - serialize calls to open_xxxx()
aea863
functions) introduces a deadlock when using the dumpmaps function.
aea863
aea863
In this case the open fd mutex needs to be unlocked in the forked
aea863
child process of the do_spawn() function.
aea863
aea863
Signed-off-by: Ian Kent <raven@themaw.net>
aea863
---
aea863
 CHANGELOG      |    1 +
aea863
 daemon/spawn.c |    1 +
aea863
 2 files changed, 2 insertions(+)
aea863
aea863
diff --git a/CHANGELOG b/CHANGELOG
aea863
index 2747327b..0f30596f 100644
aea863
--- a/CHANGELOG
aea863
+++ b/CHANGELOG
aea863
@@ -2,6 +2,7 @@ xx/xx/2018 autofs-5.1.5
aea863
 - fix flag file permission.
aea863
 - fix directory create permission.
aea863
 - fix use after free in do_master_list_reset().
aea863
+- fix deadlock in dumpmaps.
aea863
 
aea863
 19/12/2017 autofs-5.1.4
aea863
 - fix spec file url.
aea863
diff --git a/daemon/spawn.c b/daemon/spawn.c
aea863
index fabe577e..dbbca7fa 100644
aea863
--- a/daemon/spawn.c
aea863
+++ b/daemon/spawn.c
aea863
@@ -338,6 +338,7 @@ static int do_spawn(unsigned logopt, unsigned int wait,
aea863
 		dup2(pipefd[1], STDOUT_FILENO);
aea863
 		dup2(pipefd[1], STDERR_FILENO);
aea863
 		close(pipefd[1]);
aea863
+		open_mutex_unlock();
aea863
 
aea863
 		/* what to mount must always be second last */
aea863
 		while (*pargv++)