device-mapper-multipath-0.9.7-5
Add 0014-multipathd-fix-null-pointer-dereference-in-uev_updat.patch * Fix auto_resize code to avoid a segfault Add 0015-multipathd-fix-auto-resize-configuration.patch * Fix auto_resize default value
This commit is contained in:
parent
b0b20d4f7b
commit
835a8a43de
@ -0,0 +1,27 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
Date: Tue, 16 Jan 2024 00:54:37 -0500
|
||||
Subject: [PATCH] multipathd: fix null pointer dereference in uev_update_path
|
||||
|
||||
The Auto-resize code added a check that deferences pp->mpp without
|
||||
checking that it's non-NULL. Fix it.
|
||||
|
||||
Fixes: 981b83ad1 ("multipathd: Add auto_resize config option")
|
||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
---
|
||||
multipathd/main.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/multipathd/main.c b/multipathd/main.c
|
||||
index 230c9d10..57c04364 100644
|
||||
--- a/multipathd/main.c
|
||||
+++ b/multipathd/main.c
|
||||
@@ -1653,7 +1653,7 @@ uev_update_path (struct uevent *uev, struct vectors * vecs)
|
||||
}
|
||||
}
|
||||
}
|
||||
- if (auto_resize != AUTO_RESIZE_NEVER &&
|
||||
+ if (auto_resize != AUTO_RESIZE_NEVER && mpp &&
|
||||
!mpp->wait_for_udev) {
|
||||
struct pathgroup *pgp;
|
||||
struct path *pp2;
|
42
0015-multipathd-fix-auto-resize-configuration.patch
Normal file
42
0015-multipathd-fix-auto-resize-configuration.patch
Normal file
@ -0,0 +1,42 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
Date: Tue, 16 Jan 2024 01:11:02 -0500
|
||||
Subject: [PATCH] multipathd: fix auto-resize configuration
|
||||
|
||||
The code acted like AUTO_RESIZE_UNDEFINED didn't exist, but since
|
||||
conf->auto_resize was never set to AUTO_RESIZE_NEVER, the default was in
|
||||
fact AUTO_RESIZE_UNDEFINED, which ended up getting treated like
|
||||
AUTO_RESIZE_GROW_SHRINK. Remove AUTO_RESIZE_UNDEFINED and explicitly
|
||||
default auto_resize tp AUTO_RESIZE_NEVER.
|
||||
|
||||
Fixes: 981b83ad1 ("multipathd: Add auto_resize config option")
|
||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
---
|
||||
libmultipath/config.c | 1 +
|
||||
libmultipath/structs.h | 1 -
|
||||
2 files changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libmultipath/config.c b/libmultipath/config.c
|
||||
index 4544f484..3d5943d3 100644
|
||||
--- a/libmultipath/config.c
|
||||
+++ b/libmultipath/config.c
|
||||
@@ -927,6 +927,7 @@ int _init_config (const char *file, struct config *conf)
|
||||
conf->retrigger_tries = DEFAULT_RETRIGGER_TRIES;
|
||||
conf->retrigger_delay = DEFAULT_RETRIGGER_DELAY;
|
||||
conf->uev_wait_timeout = DEFAULT_UEV_WAIT_TIMEOUT;
|
||||
+ conf->auto_resize = DEFAULT_AUTO_RESIZE;
|
||||
conf->remove_retries = 0;
|
||||
conf->ghost_delay = DEFAULT_GHOST_DELAY;
|
||||
conf->all_tg_pt = DEFAULT_ALL_TG_PT;
|
||||
diff --git a/libmultipath/structs.h b/libmultipath/structs.h
|
||||
index a1aac1b4..734905e2 100644
|
||||
--- a/libmultipath/structs.h
|
||||
+++ b/libmultipath/structs.h
|
||||
@@ -180,7 +180,6 @@ enum queue_mode_states {
|
||||
};
|
||||
|
||||
enum auto_resize_state {
|
||||
- AUTO_RESIZE_UNDEF = 0,
|
||||
AUTO_RESIZE_NEVER,
|
||||
AUTO_RESIZE_GROW_ONLY,
|
||||
AUTO_RESIZE_GROW_SHRINK,
|
@ -1,6 +1,6 @@
|
||||
Name: device-mapper-multipath
|
||||
Version: 0.9.7
|
||||
Release: 4%{?dist}
|
||||
Release: 5%{?dist}
|
||||
Summary: Tools to manage multipath devices using device-mapper
|
||||
License: GPLv2
|
||||
URL: http://christophe.varoqui.free.fr/
|
||||
@ -23,6 +23,8 @@ Patch0010: 0010-RH-make-parse_vpd_pg83-match-scsi_id-output.patch
|
||||
Patch0011: 0011-RH-add-scsi-device-handlers-to-modules-load.d.patch
|
||||
Patch0012: 0012-RH-compile-with-libreadline-support.patch
|
||||
Patch0013: 0013-RH-Add-mpathcleanup.patch
|
||||
Patch0014: 0014-multipathd-fix-null-pointer-dereference-in-uev_updat.patch
|
||||
Patch0015: 0015-multipathd-fix-auto-resize-configuration.patch
|
||||
|
||||
# runtime
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
@ -231,6 +233,12 @@ fi
|
||||
%{_pkgconfdir}/libdmmp.pc
|
||||
|
||||
%changelog
|
||||
* Tue Jan 16 2024 Benjamin Marzinski <bmarzins@redhat.com> - 0.9.7-5
|
||||
- Add 0014-multipathd-fix-null-pointer-dereference-in-uev_updat.patch
|
||||
* Fix auto_resize code to avoid a segfault
|
||||
- Add 0015-multipathd-fix-auto-resize-configuration.patch
|
||||
* Fix auto_resize default value
|
||||
|
||||
* Thu Nov 30 2023 Benjamin Marzinski <bmarzins@redhat.com> - 0.9.7-4
|
||||
- Use modulesloaddir macro for installing scsi_dh.conf
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user