[PATCH] multipathd pthread locking fix

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

 



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@xxxxxxxxxxxxx>

--- ./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);
 
 	/*
--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel

[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux