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

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