summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Zeffertt <alex.zeffertt@eu.citrix.com>2010-02-03 13:29:37 +0100
committerChristophe Varoqui <christophe.varoqui@free.fr>2010-02-03 13:29:37 +0100
commit04da4f3bb886fa0fcf0a018add1d5b6e4b7b7ede (patch)
treec991cebf5b702f734c04d43aafd2b29fefaf9013
parent0cca36611a04e26aee7052cd911687867870085a (diff)
downloadmultipath-tools-04da4f3bb886fa0fcf0a018add1d5b6e4b7b7ede.tar.gz
multipath-tools-04da4f3bb886fa0fcf0a018add1d5b6e4b7b7ede.tar.bz2
multipath-tools-04da4f3bb886fa0fcf0a018add1d5b6e4b7b7ede.zip
[multipathd] Fix pthread bug in multipath-tools.
You should lock the mutex before doing a pthread_cond_wait otherwise undefined results occur. In fact we get away with this with glibc, but with uclibc it causes a segfault.
-rw-r--r--multipathd/main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/multipathd/main.c b/multipathd/main.c
index 73b06cb..e875d14 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -1441,6 +1441,7 @@ child (void * param)
pthread_create(&uxlsnr_thr, &misc_attr, uxlsnrloop, vecs);
pthread_attr_destroy(&misc_attr);
+ lock(&exit_mutex);
pthread_cond_wait(&exit_cond, &exit_mutex);
/*