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

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