device-mapper-multipath-0.7.9-5.git2df6110
Rename files * Previous patch 0006-0014 are now patches 0008-0016 Add 0006-multipathd-avoid-null-pointer-dereference-in-LOG_MSG.patch Add 0007-multipath-blacklist-zram-devices.patch * The above 2 patches have been submitted upstream Resolves: bz #1672761
This commit is contained in:
parent
719f475042
commit
f97259d84a
@ -0,0 +1,54 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
Date: Wed, 6 Feb 2019 12:01:32 -0600
|
||||
Subject: [PATCH] multipathd: avoid null pointer dereference in LOG_MSG
|
||||
|
||||
LOG_MSG() will dereference pp->mpp. Commit cb5ec664 added a call to
|
||||
LOG_MSG() before the check for (!pp->mpp) in check_path. This can cause
|
||||
multipathd to crash. LOG_MSG() should only be called if pp->mpp is set
|
||||
and a checker is selected.
|
||||
|
||||
Also, checker_message() should fail to a generic message if c->cls isn't
|
||||
set (which means that a checker hasn't been selected).
|
||||
|
||||
Fixes: cb5ec664 (multipathd: check_path: improve logging for "unusable
|
||||
path" case)
|
||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
---
|
||||
libmultipath/checkers.c | 2 +-
|
||||
multipathd/main.c | 6 ++++--
|
||||
2 files changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/libmultipath/checkers.c b/libmultipath/checkers.c
|
||||
index 848c4c3..ca95cae 100644
|
||||
--- a/libmultipath/checkers.c
|
||||
+++ b/libmultipath/checkers.c
|
||||
@@ -295,7 +295,7 @@ const char *checker_message(const struct checker *c)
|
||||
{
|
||||
int id;
|
||||
|
||||
- if (!c || c->msgid < 0 ||
|
||||
+ if (!c || !c->cls || c->msgid < 0 ||
|
||||
(c->msgid >= CHECKER_GENERIC_MSGTABLE_SIZE &&
|
||||
c->msgid < CHECKER_FIRST_MSGID))
|
||||
goto bad_id;
|
||||
diff --git a/multipathd/main.c b/multipathd/main.c
|
||||
index 0e3ac2c..1caa40f 100644
|
||||
--- a/multipathd/main.c
|
||||
+++ b/multipathd/main.c
|
||||
@@ -2017,8 +2017,10 @@ check_path (struct vectors * vecs, struct path * pp, int ticks)
|
||||
}
|
||||
|
||||
if (newstate == PATH_WILD || newstate == PATH_UNCHECKED) {
|
||||
- condlog(2, "%s: unusable path - checker failed", pp->dev);
|
||||
- LOG_MSG(2, verbosity, pp);
|
||||
+ condlog(2, "%s: unusable path (%s) - checker failed", pp->dev,
|
||||
+ checker_state_name(newstate));
|
||||
+ if (pp->mpp && checker_selected(&pp->checker))
|
||||
+ LOG_MSG(2, verbosity, pp);
|
||||
conf = get_multipath_config();
|
||||
pthread_cleanup_push(put_multipath_config, conf);
|
||||
pathinfo(pp, conf, 0);
|
||||
--
|
||||
2.17.2
|
||||
|
40
0007-multipath-blacklist-zram-devices.patch
Normal file
40
0007-multipath-blacklist-zram-devices.patch
Normal file
@ -0,0 +1,40 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
Date: Wed, 6 Feb 2019 13:46:10 -0600
|
||||
Subject: [PATCH] multipath: blacklist zram devices
|
||||
|
||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
---
|
||||
libmultipath/blacklist.c | 2 +-
|
||||
multipath/multipath.conf.5 | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/libmultipath/blacklist.c b/libmultipath/blacklist.c
|
||||
index 709895e..e0d0279 100644
|
||||
--- a/libmultipath/blacklist.c
|
||||
+++ b/libmultipath/blacklist.c
|
||||
@@ -192,7 +192,7 @@ setup_default_blist (struct config * conf)
|
||||
char * str;
|
||||
int i;
|
||||
|
||||
- str = STRDUP("^(ram|raw|loop|fd|md|dm-|sr|scd|st|dcssblk)[0-9]");
|
||||
+ str = STRDUP("^(ram|zram|raw|loop|fd|md|dm-|sr|scd|st|dcssblk)[0-9]");
|
||||
if (!str)
|
||||
return 1;
|
||||
if (store_ble(conf->blist_devnode, str, ORIGIN_DEFAULT))
|
||||
diff --git a/multipath/multipath.conf.5 b/multipath/multipath.conf.5
|
||||
index 88b8edd..0fe8461 100644
|
||||
--- a/multipath/multipath.conf.5
|
||||
+++ b/multipath/multipath.conf.5
|
||||
@@ -1218,7 +1218,7 @@ Regular expression matching the device nodes to be excluded/included.
|
||||
.RS
|
||||
.PP
|
||||
The default \fIblacklist\fR consists of the regular expressions
|
||||
-"^(ram|raw|loop|fd|md|dm-|sr|scd|st|dcssblk)[0-9]" and
|
||||
+"^(ram|zram|raw|loop|fd|md|dm-|sr|scd|st|dcssblk)[0-9]" and
|
||||
"^(td|hd|vd)[a-z]". This causes virtual devices, non-disk devices, and some other
|
||||
device types to be excluded from multipath handling by default.
|
||||
.RE
|
||||
--
|
||||
2.17.2
|
||||
|
@ -18,7 +18,7 @@ Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
2 files changed, 10 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/libmultipath/blacklist.c b/libmultipath/blacklist.c
|
||||
index 709895e..224e5b3 100644
|
||||
index e0d0279..556c0b9 100644
|
||||
--- a/libmultipath/blacklist.c
|
||||
+++ b/libmultipath/blacklist.c
|
||||
@@ -204,12 +204,6 @@ setup_default_blist (struct config * conf)
|
||||
@ -49,7 +49,7 @@ index 709895e..224e5b3 100644
|
||||
udev_device_get_properties_list_entry(udev)) {
|
||||
|
||||
diff --git a/multipath/multipath.conf.5 b/multipath/multipath.conf.5
|
||||
index 88b8edd..2f6cf03 100644
|
||||
index 0fe8461..ad653a8 100644
|
||||
--- a/multipath/multipath.conf.5
|
||||
+++ b/multipath/multipath.conf.5
|
||||
@@ -1239,16 +1239,14 @@ keywords. Both are regular expressions. For a full description of these keywords
|
@ -1,6 +1,6 @@
|
||||
Name: device-mapper-multipath
|
||||
Version: 0.7.9
|
||||
Release: 4.git2df6110%{?dist}
|
||||
Release: 5.git2df6110%{?dist}
|
||||
Summary: Tools to manage multipath devices using device-mapper
|
||||
License: GPLv2
|
||||
URL: http://christophe.varoqui.free.fr/
|
||||
@ -15,15 +15,17 @@ Patch0002: 0002-libmultipath-handle-existing-paths-in-marginal_path-.patch
|
||||
Patch0003: 0003-multipathd-cleanup-marginal-paths-checking-timers.patch
|
||||
Patch0004: 0004-libmultipath-fix-marginal-paths-queueing-errors.patch
|
||||
Patch0005: 0005-libmultipath-fix-marginal_paths-nr_active-check.patch
|
||||
Patch0006: 0006-RH-fixup-udev-rules-for-redhat.patch
|
||||
Patch0007: 0007-RH-Remove-the-property-blacklist-exception-builtin.patch
|
||||
Patch0008: 0008-RH-don-t-start-without-a-config-file.patch
|
||||
Patch0009: 0009-RH-use-rpm-optflags-if-present.patch
|
||||
Patch0010: 0010-RH-add-mpathconf.patch
|
||||
Patch0011: 0011-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch
|
||||
Patch0012: 0012-RH-warn-on-invalid-regex-instead-of-failing.patch
|
||||
Patch0013: 0013-RH-reset-default-find_mutipaths-value-to-off.patch
|
||||
Patch0014: 0014-RH-Fix-nvme-compilation-warning.patch
|
||||
Patch0006: 0006-multipathd-avoid-null-pointer-dereference-in-LOG_MSG.patch
|
||||
Patch0007: 0007-multipath-blacklist-zram-devices.patch
|
||||
Patch0008: 0008-RH-fixup-udev-rules-for-redhat.patch
|
||||
Patch0009: 0009-RH-Remove-the-property-blacklist-exception-builtin.patch
|
||||
Patch0010: 0010-RH-don-t-start-without-a-config-file.patch
|
||||
Patch0011: 0011-RH-use-rpm-optflags-if-present.patch
|
||||
Patch0012: 0012-RH-add-mpathconf.patch
|
||||
Patch0013: 0013-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch
|
||||
Patch0014: 0014-RH-warn-on-invalid-regex-instead-of-failing.patch
|
||||
Patch0015: 0015-RH-reset-default-find_mutipaths-value-to-off.patch
|
||||
Patch0016: 0016-RH-Fix-nvme-compilation-warning.patch
|
||||
|
||||
# runtime
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
@ -121,6 +123,8 @@ device-mapper-multipath's libdmmp C API library
|
||||
%patch0012 -p1
|
||||
%patch0013 -p1
|
||||
%patch0014 -p1
|
||||
%patch0015 -p1
|
||||
%patch0016 -p1
|
||||
cp %{SOURCE1} .
|
||||
|
||||
%build
|
||||
@ -232,6 +236,14 @@ fi
|
||||
%{_pkgconfdir}/libdmmp.pc
|
||||
|
||||
%changelog
|
||||
* Thu Jan 31 2019 Benjamin Marzinski <bmarzins@redhat.com> - 0.7.9-5.git2df6110
|
||||
- Rename files
|
||||
* Previous patch 0006-0014 are now patches 0008-0016
|
||||
- Add 0006-multipathd-avoid-null-pointer-dereference-in-LOG_MSG.patch
|
||||
- Add 0007-multipath-blacklist-zram-devices.patch
|
||||
* The above 2 patches have been submitted upstream
|
||||
- Resolves: bz #1672761
|
||||
|
||||
* Thu Jan 31 2019 Benjamin Marzinski <bmarzins@redhat.com> - 0.7.9-4.git2df6110
|
||||
- Update Source to latest upstream commit
|
||||
* previous patch 0001-libmultipath-dm_is_mpath-cleanup.patch is included
|
||||
|
Loading…
Reference in New Issue
Block a user