autofs-5.0.4 - fix pthread push order in expire_proc_direct()
From: Ian Kent <raven@themaw.net>
Apparently the pthread_cleanup_push() has the quite stupid semantic
of not working properly if the value of the pointer passed to it
changes after it has been called.
---
CHANGELOG | 1 +
daemon/direct.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
--- autofs-5.0.4.orig/CHANGELOG
+++ autofs-5.0.4/CHANGELOG
@@ -58,6 +58,7 @@
- fix map type info parse error.
- fix an RPC fd leak.
- don't block signals we expect to dump core.
+- fix pthread push order in expire_proc_direct().
4/11/2008 autofs-5.0.4
-----------------------
--- autofs-5.0.4.orig/daemon/direct.c
+++ autofs-5.0.4/daemon/direct.c
@@ -823,8 +823,8 @@ void *expire_proc_direct(void *arg)
left = 0;
- pthread_cleanup_push(mnts_cleanup, mnts);
mnts = tree_make_mnt_tree(_PROC_MOUNTS, "/");
+ pthread_cleanup_push(mnts_cleanup, mnts);
/* Get a list of mounts select real ones and expire them if possible */
INIT_LIST_HEAD(&list);