diff options
| author | Benjamin Marzinski <bmarzins@redhat.com> | 2013-03-28 07:24:22 -0500 |
|---|---|---|
| committer | Benjamin Marzinski <bmarzins@redhat.com> | 2013-03-28 07:24:22 -0500 |
| commit | 0a249b06ae9d3692813e73262d8ce7593ee7f4bf (patch) | |
| tree | b0331f7ad78e31a8cc39917404293e0e1f4fc1e8 /0020-RHBZ-907360-static-pthread-init.patch | |
| parent | d1207a7795f6efc52e321e735a92d7b3d80aaaba (diff) | |
device-mapper-multipath-0.4.9-46
Add 0020-RHBZ-907360-static-pthread-init.patch
* statically initialize the uevent pthread structures
Diffstat (limited to '0020-RHBZ-907360-static-pthread-init.patch')
| -rw-r--r-- | 0020-RHBZ-907360-static-pthread-init.patch | 39 |
1 files changed, 39 insertions, 0 deletions
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; + } + |
