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

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