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

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