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

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