diff options
author | Alex Zeffertt <alex.zeffertt@eu.citrix.com> | 2010-02-03 13:29:37 +0100 |
---|---|---|
committer | Christophe Varoqui <christophe.varoqui@free.fr> | 2010-02-03 13:29:37 +0100 |
commit | 04da4f3bb886fa0fcf0a018add1d5b6e4b7b7ede (patch) | |
tree | c991cebf5b702f734c04d43aafd2b29fefaf9013 | |
parent | 0cca36611a04e26aee7052cd911687867870085a (diff) | |
download | multipath-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.c | 1 |
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); /* |