[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[dm-devel] [PATCH] multipathd pthread locking fix



The following patch is needed to stop multipathd segfaulting on uClibc.

Regards,

Alex Zeffertt
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.


Signed-off-by: Alex Zeffertt <alex zeffertt eu citrix com>

--- ./multipathd/main.c.orig	2010-02-03 05:42:14.000000000 -0500
+++ ./multipathd/main.c	2010-02-03 05:43:13.000000000 -0500
@@ -1668,6 +1668,7 @@
 	/*pthread_create(&uevent_thr, &attr, ueventloop, vecs);*/
 	pthread_create(&uxlsnr_thr, &attr, uxlsnrloop, vecs);
 
+	lock(&exit_mutex);
 	pthread_cond_wait(&exit_cond, &exit_mutex);
 
 	/*

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]