projects
/
platform
/
upstream
/
multipath-tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0cca366
)
[multipathd] Fix pthread bug in multipath-tools.
author
Alex Zeffertt
<alex.zeffertt@eu.citrix.com>
Wed, 3 Feb 2010 12:29:37 +0000
(13:29 +0100)
committer
Christophe Varoqui
<christophe.varoqui@free.fr>
Wed, 3 Feb 2010 12:29:37 +0000
(13:29 +0100)
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.
multipathd/main.c
patch
|
blob
|
history
diff --git
a/multipathd/main.c
b/multipathd/main.c
index
73b06cb
..
e875d14
100644
(file)
--- 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);
/*