From: Martin Wilck <mwilck@suse.com>
To: Christophe Varoqui <christophe.varoqui@opensvc.com>,
Benjamin Marzinski <bmarzins@redhat.com>
Cc: dm-devel@redhat.com, Martin Wilck <mwilck@suse.com>
Subject: [PATCH v3 1/7] libmultipath: set pp->checkint in store_pathinfo()
Date: Fri, 2 Nov 2018 13:23:56 +0100 [thread overview]
Message-ID: <20181102122402.31145-2-mwilck@suse.com> (raw)
In-Reply-To: <20181102122402.31145-1-mwilck@suse.com>
store_pathinfo is called with valid conf pointer anyway, so
checkint is available. pp->checkint is now valid for every
path after path_discovery().
This fixes a bad conf access in cli_add_path().
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Martin Wilck <mwilck@suse.com>
---
libmultipath/discovery.c | 1 +
multipathd/cli_handlers.c | 1 -
multipathd/main.c | 2 --
3 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
index a6159e4a..63558ad8 100644
--- a/libmultipath/discovery.c
+++ b/libmultipath/discovery.c
@@ -103,6 +103,7 @@ store_pathinfo (vector pathvec, struct config *conf,
err = store_path(pathvec, pp);
if (err)
goto out;
+ pp->checkint = conf->checkint;
out:
if (err)
diff --git a/multipathd/cli_handlers.c b/multipathd/cli_handlers.c
index 75000807..4aea4ce7 100644
--- a/multipathd/cli_handlers.c
+++ b/multipathd/cli_handlers.c
@@ -736,7 +736,6 @@ cli_add_path (void * v, char ** reply, int * len, void * data)
condlog(0, "%s: failed to store path info", param);
return 1;
}
- pp->checkint = conf->checkint;
}
return ev_add_path(pp, vecs, 1);
blacklisted:
diff --git a/multipathd/main.c b/multipathd/main.c
index c57aa392..958545a4 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -2324,8 +2324,6 @@ configure (struct vectors * vecs)
free_path(pp);
i--;
}
- else
- pp->checkint = conf->checkint;
pthread_cleanup_pop(1);
}
if (map_discovery(vecs)) {
--
2.19.1
next prev parent reply other threads:[~2018-11-02 12:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-02 12:23 [PATCH v3 0/7] multipathd: make uxlsnr errors really fatal Martin Wilck
2018-11-02 12:23 ` Martin Wilck [this message]
2018-11-02 12:23 ` [PATCH v3 2/7] multipathd: remove init_path_check_interval() Martin Wilck
2018-11-02 12:23 ` [PATCH v3 3/7] multipathd: print error message if checkint is not initialized Martin Wilck
2018-11-02 12:23 ` [PATCH v3 4/7] multipathd: open client socket early Martin Wilck
2018-11-02 17:08 ` Benjamin Marzinski
2018-11-02 12:24 ` [PATCH v3 5/7] multipathd: set DAEMON_CONFIGURE from uxlsnr thread Martin Wilck
2018-11-02 12:24 ` [PATCH v3 6/7] multipathd: make DAEMON_SHUTDOWN a terminal state Martin Wilck
2018-11-02 12:24 ` [PATCH v3 7/7] multipathd: only grab conf once for filter_path() Martin Wilck
2018-11-14 7:38 ` [PATCH v3 0/7] multipathd: make uxlsnr errors really fatal 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=20181102122402.31145-2-mwilck@suse.com \
--to=mwilck@suse.com \
--cc=bmarzins@redhat.com \
--cc=christophe.varoqui@opensvc.com \
--cc=dm-devel@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox