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

cef8f8
autofs-5.1.4 - fix deadlock in dumpmaps
cef8f8
cef8f8
From: Ian Kent <raven@themaw.net>
cef8f8
cef8f8
Commit a223d11fa8e (autofs-5.1.3 - serialize calls to open_xxxx()
cef8f8
functions) introduces a deadlock when using the dumpmaps function.
cef8f8
cef8f8
In this case the open fd mutex needs to be unlocked in the forked
cef8f8
child process of the do_spawn() function.
cef8f8
cef8f8
Signed-off-by: Ian Kent <raven@themaw.net>
cef8f8
---
cef8f8
 CHANGELOG      |    1 +
cef8f8
 daemon/spawn.c |    1 +
cef8f8
 2 files changed, 2 insertions(+)
cef8f8
cef8f8
--- autofs-5.0.7.orig/CHANGELOG
cef8f8
+++ autofs-5.0.7/CHANGELOG
cef8f8
@@ -290,6 +290,7 @@
cef8f8
 - move open_xxxx() functions to spawn.c.
cef8f8
 - serialize calls to open_xxxx() functions.
cef8f8
 - fix use after free in do_master_list_reset().
cef8f8
+- fix deadlock in dumpmaps.
cef8f8
 
cef8f8
 25/07/2012 autofs-5.0.7
cef8f8
 =======================
cef8f8
--- autofs-5.0.7.orig/daemon/spawn.c
cef8f8
+++ autofs-5.0.7/daemon/spawn.c
cef8f8
@@ -337,6 +337,7 @@ static int do_spawn(unsigned logopt, uns
cef8f8
 		dup2(pipefd[1], STDOUT_FILENO);
cef8f8
 		dup2(pipefd[1], STDERR_FILENO);
cef8f8
 		close(pipefd[1]);
cef8f8
+		open_mutex_unlock();
cef8f8
 
cef8f8
 		/* what to mount must always be second last */
cef8f8
 		while (*pargv++)