From: Martin Wilck <mwilck@suse.com>
To: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: dm-devel@redhat.com, Xose Vazquez Perez <xose.vazquez@gmail.com>,
Martin Wilck <mwilck@suse.com>
Subject: [PATCH 1/4] libmultipath: fix crash on shutdown if io_err thread isn't running
Date: Thu, 8 Mar 2018 00:08:56 +0100 [thread overview]
Message-ID: <20180307230859.14926-2-mwilck@suse.com> (raw)
In-Reply-To: <20180307230859.14926-1-mwilck@suse.com>
If we've never created the io_error checker thread, we shouldn't
cancel it.
Fixes: 160da9fa4339 "multipathd: start marginal path checker thread
lazily"
Signed-off-by: Martin Wilck <mwilck@suse.com>
---
libmultipath/io_err_stat.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libmultipath/io_err_stat.c b/libmultipath/io_err_stat.c
index ac81b4b9390d..02b1453ea527 100644
--- a/libmultipath/io_err_stat.c
+++ b/libmultipath/io_err_stat.c
@@ -793,6 +793,9 @@ destroy_ctx:
void stop_io_err_stat_thread(void)
{
+ if (io_err_stat_thr == (pthread_t)0)
+ return;
+
if (uatomic_read(&io_err_thread_running) == 1)
pthread_cancel(io_err_stat_thr);
--
2.16.1
next prev parent reply other threads:[~2018-03-07 23:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-07 23:08 [PATCH 0/4] multipath-tools: important fixes for 0.7.5 Martin Wilck
2018-03-07 23:08 ` Martin Wilck [this message]
2018-03-07 23:08 ` [PATCH 2/4] multipathd: fix -Wpointer-to-int-cast warning in uxlsnr Martin Wilck
2018-03-07 23:08 ` [PATCH 3/4] multipath: fix clang warning in delegate_to_multipathd Martin Wilck
2018-03-07 23:08 ` [PATCH 4/4] multipath-tools: build: prevent intermediate file deletion Martin Wilck
2018-03-08 16:04 ` [PATCH 0/4] multipath-tools: important fixes for 0.7.5 Xose Vazquez Perez
2018-03-10 7:43 ` Christophe Varoqui
2018-03-27 19:39 ` Michael Laß
2018-03-27 20:55 ` Christophe Varoqui
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180307230859.14926-2-mwilck@suse.com \
--to=mwilck@suse.com \
--cc=christophe.varoqui@opensvc.com \
--cc=dm-devel@redhat.com \
--cc=xose.vazquez@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.