]>
Commit | Line | Data |
---|---|---|
e5fd101c PS |
1 | autofs-5.0.4 - fix pthread push order in expire_proc_direct() |
2 | ||
3 | From: Ian Kent <raven@themaw.net> | |
4 | ||
5 | Apparently the pthread_cleanup_push() has the quite stupid semantic | |
6 | of not working properly if the value of the pointer passed to it | |
7 | changes after it has been called. | |
8 | --- | |
9 | ||
10 | CHANGELOG | 1 + | |
11 | daemon/direct.c | 2 +- | |
12 | 2 files changed, 2 insertions(+), 1 deletions(-) | |
13 | ||
14 | ||
15 | diff --git a/CHANGELOG b/CHANGELOG | |
16 | index 4b85649..4491449 100644 | |
17 | --- a/CHANGELOG | |
18 | +++ b/CHANGELOG | |
19 | @@ -58,6 +58,7 @@ | |
20 | - fix map type info parse error. | |
21 | - fix an RPC fd leak. | |
22 | - don't block signals we expect to dump core. | |
23 | +- fix pthread push order in expire_proc_direct(). | |
24 | ||
25 | 4/11/2008 autofs-5.0.4 | |
26 | ----------------------- | |
27 | diff --git a/daemon/direct.c b/daemon/direct.c | |
28 | index 7b02c7a..0f33d03 100644 | |
29 | --- a/daemon/direct.c | |
30 | +++ b/daemon/direct.c | |
31 | @@ -823,8 +823,8 @@ void *expire_proc_direct(void *arg) | |
32 | ||
33 | left = 0; | |
34 | ||
35 | - pthread_cleanup_push(mnts_cleanup, mnts); | |
36 | mnts = tree_make_mnt_tree(_PROC_MOUNTS, "/"); | |
37 | + pthread_cleanup_push(mnts_cleanup, mnts); | |
38 | ||
39 | /* Get a list of mounts select real ones and expire them if possible */ | |
40 | INIT_LIST_HEAD(&list); |