diff --git a/0020-RHBZ-907360-static-pthread-init.patch b/0020-RHBZ-907360-static-pthread-init.patch new file mode 100644 index 0000000..00e9a45 --- /dev/null +++ b/0020-RHBZ-907360-static-pthread-init.patch @@ -0,0 +1,39 @@ +--- + libmultipath/uevent.c | 10 ++++------ + 1 file changed, 4 insertions(+), 6 deletions(-) + +Index: multipath-tools-130222/libmultipath/uevent.c +=================================================================== +--- multipath-tools-130222.orig/libmultipath/uevent.c ++++ multipath-tools-130222/libmultipath/uevent.c +@@ -53,8 +53,10 @@ typedef int (uev_trigger)(struct uevent + + pthread_t uevq_thr; + LIST_HEAD(uevq); +-pthread_mutex_t uevq_lock, *uevq_lockp = &uevq_lock; +-pthread_cond_t uev_cond, *uev_condp = &uev_cond; ++pthread_mutex_t uevq_lock = PTHREAD_MUTEX_INITIALIZER; ++pthread_mutex_t *uevq_lockp = &uevq_lock; ++pthread_cond_t uev_cond = PTHREAD_COND_INITIALIZER; ++pthread_cond_t *uev_condp = &uev_cond; + uev_trigger *my_uev_trigger; + void * my_trigger_data; + int servicing_uev; +@@ -411,8 +413,6 @@ int uevent_listen(void) + */ + INIT_LIST_HEAD(&uevq); + +- pthread_mutex_init(uevq_lockp, NULL); +- pthread_cond_init(uev_condp, NULL); + pthread_cleanup_push(uevq_stop, NULL); + + monitor = udev_monitor_new_from_netlink(conf->udev, "udev"); +@@ -525,8 +525,6 @@ out: + if (need_failback) + err = failback_listen(); + pthread_cleanup_pop(1); +- pthread_mutex_destroy(uevq_lockp); +- pthread_cond_destroy(uev_condp); + return err; + } + diff --git a/device-mapper-multipath.spec b/device-mapper-multipath.spec index dd284ec..94b892f 100644 --- a/device-mapper-multipath.spec +++ b/device-mapper-multipath.spec @@ -1,7 +1,7 @@ Summary: Tools to manage multipath devices using device-mapper Name: device-mapper-multipath Version: 0.4.9 -Release: 45%{?dist} +Release: 46%{?dist} License: GPL+ Group: System Environment/Base URL: http://christophe.varoqui.free.fr/ @@ -27,6 +27,7 @@ Patch0016: 0016-RH-dont-print-ghost-messages.patch Patch0017: 0017-RH-fix-sigusr1.patch Patch0018: 0018-RH-fix-factorize.patch Patch0019: 0019-RH-fix-sockets.patch +Patch0020: 0020-RHBZ-907360-static-pthread-init.patch # runtime Requires: %{name}-libs = %{version}-%{release} @@ -98,6 +99,7 @@ kpartx manages partition creation and removal for device-mapper devices. %patch0017 -p1 %patch0018 -p1 %patch0019 -p1 +%patch0020 -p1 cp %{SOURCE1} . %build @@ -188,6 +190,10 @@ bin/systemctl --no-reload enable multipathd.service >/dev/null 2>&1 ||: %{_mandir}/man8/kpartx.8.gz %changelog +* Thu Mar 28 2013 Benjamin Marzinski 0.4.9-46 +- Add 0020-RHBZ-907360-static-pthread-init.patch + * statically initialize the uevent pthread structures + * Sat Mar 2 2013 Benjamin Marzinski 0.4.9-45 - Updated to latest upstrem 0.4.9 code: multipath-tools-130222 (git commit id: 67b82ad6fe280caa1770025a6bb8110b633fa136)