From 42ed3aadf98f4b92e931a35644c0f41215fa3590 Mon Sep 17 00:00:00 2001 From: lixiaokeng Date: Fri, 16 Oct 2020 16:55:23 +0800 Subject: [PATCH] remove patch that has been fix in 0.8.4 --- ...-to-info-if-alua-is-not-support-by-s.patch | 0 ...mory-leaks-issues-in-libmpathpersist.patch | 129 ------------------ ...eference-when-path-is-freed-otherwis.patch | 0 ...h-fix-memory-leak-in-disassemble_map.patch | 0 ...h => 0019-fix-find-multipath-failure.patch | 0 ...hange-kpartx-file-and-default-bindir.patch | 0 ...ath-fix-use-after-free-when-iscsi-lo.patch | 0 ...n-if-freeing-path-that-holds-mpp-hwe.patch | 0 ...ath-warn-about-NULL-value-of-mpp-hwe.patch | 0 ...h-fix-mpp-hwe-handling-in-sync_paths.patch | 0 ...5-fix-boolean-value-with-json-c-0.14.patch | 0 multipath-tools.spec | 29 ++-- 12 files changed, 17 insertions(+), 141 deletions(-) rename 0017-bugfix-change-log-level-to-info-if-alua-is-not-support-by-s.patch => 0016-bugfix-change-log-level-to-info-if-alua-is-not-support-by-s.patch (100%) delete mode 100644 0016-bugfix-some-memory-leaks-issues-in-libmpathpersist.patch rename 0018-bugfix-clear-mpp-path-reference-when-path-is-freed-otherwis.patch => 0017-bugfix-clear-mpp-path-reference-when-path-is-freed-otherwis.patch (100%) rename 0019-bugfix-libmultipath-fix-memory-leak-in-disassemble_map.patch => 0018-bugfix-libmultipath-fix-memory-leak-in-disassemble_map.patch (100%) rename 0020-fix-find-multipath-failure.patch => 0019-fix-find-multipath-failure.patch (100%) rename 0021-change-kpartx-file-and-default-bindir.patch => 0020-change-kpartx-file-and-default-bindir.patch (100%) rename 0022-master-libmultipath-fix-use-after-free-when-iscsi-lo.patch => 0021-master-libmultipath-fix-use-after-free-when-iscsi-lo.patch (100%) rename 0023-libmultipath-warn-if-freeing-path-that-holds-mpp-hwe.patch => 0022-libmultipath-warn-if-freeing-path-that-holds-mpp-hwe.patch (100%) rename 0024-libmultipath-warn-about-NULL-value-of-mpp-hwe.patch => 0023-libmultipath-warn-about-NULL-value-of-mpp-hwe.patch (100%) rename 0025-libmultipath-fix-mpp-hwe-handling-in-sync_paths.patch => 0024-libmultipath-fix-mpp-hwe-handling-in-sync_paths.patch (100%) rename 0026-fix-boolean-value-with-json-c-0.14.patch => 0025-fix-boolean-value-with-json-c-0.14.patch (100%) diff --git a/0017-bugfix-change-log-level-to-info-if-alua-is-not-support-by-s.patch b/0016-bugfix-change-log-level-to-info-if-alua-is-not-support-by-s.patch similarity index 100% rename from 0017-bugfix-change-log-level-to-info-if-alua-is-not-support-by-s.patch rename to 0016-bugfix-change-log-level-to-info-if-alua-is-not-support-by-s.patch diff --git a/0016-bugfix-some-memory-leaks-issues-in-libmpathpersist.patch b/0016-bugfix-some-memory-leaks-issues-in-libmpathpersist.patch deleted file mode 100644 index abb01fe..0000000 --- a/0016-bugfix-some-memory-leaks-issues-in-libmpathpersist.patch +++ /dev/null @@ -1,129 +0,0 @@ -From 3142e137afb8dd2bd99398d05b3c24ac9a9fd68e Mon Sep 17 00:00:00 2001 -From: "wangjun196@huawei.com" -Date: Thu, 16 Jul 2020 18:03:30 +0800 -Subject: [PATCH] 1 - ---- - libmpathpersist/mpath_persist.c | 12 ++++++++++-- - libmpathpersist/mpath_pr_ioctl.c | 28 ++++++++++++++-------------- - 2 files changed, 24 insertions(+), 16 deletions(-) - -diff --git a/libmpathpersist/mpath_persist.c b/libmpathpersist/mpath_persist.c -index 3da7a6c..0ae504e 100644 ---- a/libmpathpersist/mpath_persist.c -+++ b/libmpathpersist/mpath_persist.c -@@ -244,10 +244,14 @@ static int mpath_get_map(int fd, char **palias, struct multipath **pmpp) - - if (dm_map_present(alias) && dm_is_mpath(alias) != 1){ - condlog(3, "%s: not a multipath device.", alias); -+ if (curmp) -+ vector_free(curmp); -+ if (pathvec) -+ vector_free(pathvec); - goto out; - } - -- /* get info of all paths from the dm device */ -+ /* get info of all paths from the dm device */ - if (get_mpvec(curmp, pathvec, alias)){ - condlog(0, "%s: failed to get device info.", alias); - goto out; -@@ -823,7 +827,7 @@ out: - return (status); - } - --void * mpath_alloc_prin_response(int prin_sa) -+void *mpath_alloc_prin_response(int prin_sa) - { - void * ptr = NULL; - int size=0; -@@ -846,6 +850,10 @@ void * mpath_alloc_prin_response(int prin_sa) - if (size > 0) - { - ptr = calloc(size, 1); -+ if (!ptr) { -+ condlog (0, "failed to allocate MPATH_PRIN_RFSTAT_SA buffer"); -+ return NULL; -+ } - } - return ptr; - } -diff --git a/libmpathpersist/mpath_pr_ioctl.c b/libmpathpersist/mpath_pr_ioctl.c -index 74b26b0..8a78693 100644 ---- a/libmpathpersist/mpath_pr_ioctl.c -+++ b/libmpathpersist/mpath_pr_ioctl.c -@@ -23,8 +23,8 @@ - #define MAXRETRY 5 - - int prin_do_scsi_ioctl(char * dev, int rq_servact, struct prin_resp *resp, int noisy); --int mpath_translate_response (char * dev, struct sg_io_hdr io_hdr, -- SenseData_t *Sensedata); -+int mpath_translate_response (const char * dev, struct sg_io_hdr *io_hdr, -+ const SenseData_t *Sensedata); - void dumpHex(const char* str, int len, int no_ascii); - int prout_do_scsi_ioctl( char * dev, int rq_servact, int rq_scope, - unsigned int rq_type, struct prout_param_descriptor *paramp, int noisy); -@@ -113,7 +113,7 @@ retry : - - condlog(4, "%s: Duration=%u (ms)", dev, io_hdr.duration); - -- status = mpath_translate_response(dev, io_hdr, &Sensedata); -+ status = mpath_translate_response(dev, &io_hdr, &Sensedata); - condlog(3, "%s: status = %d", dev, status); - - if (status == MPATH_PR_SENSE_UNIT_ATTENTION && (retry > 0)) -@@ -359,7 +359,7 @@ retry : - condlog(3, "%s: duration = %u (ms)", dev, io_hdr.duration); - condlog(4, "%s: persistent reservation in: requested %d bytes but got %d bytes)", dev, mx_resp_len, got); - -- status = mpath_translate_response(dev, io_hdr, &Sensedata); -+ status = mpath_translate_response(dev, &io_hdr, &Sensedata); - - if (status == MPATH_PR_SENSE_UNIT_ATTENTION && (retry > 0)) - { -@@ -404,18 +404,18 @@ out: - return status; - } - --int mpath_translate_response (char * dev, struct sg_io_hdr io_hdr, -- SenseData_t *Sensedata) -+int mpath_translate_response (const char *dev, struct sg_io_hdr *io_hdr, -+ const SenseData_t *Sensedata) - { - condlog(3, "%s: status driver:%02x host:%02x scsi:%02x", dev, -- io_hdr.driver_status, io_hdr.host_status ,io_hdr.status); -- io_hdr.status &= 0x7e; -- if ((0 == io_hdr.status) && -- (0 == io_hdr.host_status) && -- (0 == io_hdr.driver_status)) -+ io_hdr->driver_status, io_hdr->host_status ,io_hdr->status); -+ io_hdr->status &= 0x7e; -+ if ((0 == io_hdr->status) && -+ (0 == io_hdr->host_status) && -+ (0 == io_hdr->driver_status)) - return MPATH_PR_SUCCESS; - -- switch(io_hdr.status) { -+ switch(io_hdr->status) { - case SAM_STAT_GOOD: - break; - case SAM_STAT_CHECK_CONDITION: -@@ -455,13 +455,13 @@ int mpath_translate_response (char * dev, struct sg_io_hdr io_hdr, - return MPATH_PR_OTHER; - } - -- switch(io_hdr.host_status) { -+ switch(io_hdr->host_status) { - case DID_OK : - break; - default : - return MPATH_PR_OTHER; - } -- switch(io_hdr.driver_status) -+ switch(io_hdr->driver_status) - { - case DRIVER_OK: - break; --- -1.8.3.1 - diff --git a/0018-bugfix-clear-mpp-path-reference-when-path-is-freed-otherwis.patch b/0017-bugfix-clear-mpp-path-reference-when-path-is-freed-otherwis.patch similarity index 100% rename from 0018-bugfix-clear-mpp-path-reference-when-path-is-freed-otherwis.patch rename to 0017-bugfix-clear-mpp-path-reference-when-path-is-freed-otherwis.patch diff --git a/0019-bugfix-libmultipath-fix-memory-leak-in-disassemble_map.patch b/0018-bugfix-libmultipath-fix-memory-leak-in-disassemble_map.patch similarity index 100% rename from 0019-bugfix-libmultipath-fix-memory-leak-in-disassemble_map.patch rename to 0018-bugfix-libmultipath-fix-memory-leak-in-disassemble_map.patch diff --git a/0020-fix-find-multipath-failure.patch b/0019-fix-find-multipath-failure.patch similarity index 100% rename from 0020-fix-find-multipath-failure.patch rename to 0019-fix-find-multipath-failure.patch diff --git a/0021-change-kpartx-file-and-default-bindir.patch b/0020-change-kpartx-file-and-default-bindir.patch similarity index 100% rename from 0021-change-kpartx-file-and-default-bindir.patch rename to 0020-change-kpartx-file-and-default-bindir.patch diff --git a/0022-master-libmultipath-fix-use-after-free-when-iscsi-lo.patch b/0021-master-libmultipath-fix-use-after-free-when-iscsi-lo.patch similarity index 100% rename from 0022-master-libmultipath-fix-use-after-free-when-iscsi-lo.patch rename to 0021-master-libmultipath-fix-use-after-free-when-iscsi-lo.patch diff --git a/0023-libmultipath-warn-if-freeing-path-that-holds-mpp-hwe.patch b/0022-libmultipath-warn-if-freeing-path-that-holds-mpp-hwe.patch similarity index 100% rename from 0023-libmultipath-warn-if-freeing-path-that-holds-mpp-hwe.patch rename to 0022-libmultipath-warn-if-freeing-path-that-holds-mpp-hwe.patch diff --git a/0024-libmultipath-warn-about-NULL-value-of-mpp-hwe.patch b/0023-libmultipath-warn-about-NULL-value-of-mpp-hwe.patch similarity index 100% rename from 0024-libmultipath-warn-about-NULL-value-of-mpp-hwe.patch rename to 0023-libmultipath-warn-about-NULL-value-of-mpp-hwe.patch diff --git a/0025-libmultipath-fix-mpp-hwe-handling-in-sync_paths.patch b/0024-libmultipath-fix-mpp-hwe-handling-in-sync_paths.patch similarity index 100% rename from 0025-libmultipath-fix-mpp-hwe-handling-in-sync_paths.patch rename to 0024-libmultipath-fix-mpp-hwe-handling-in-sync_paths.patch diff --git a/0026-fix-boolean-value-with-json-c-0.14.patch b/0025-fix-boolean-value-with-json-c-0.14.patch similarity index 100% rename from 0026-fix-boolean-value-with-json-c-0.14.patch rename to 0025-fix-boolean-value-with-json-c-0.14.patch diff --git a/multipath-tools.spec b/multipath-tools.spec index 88047df..06d758c 100644 --- a/multipath-tools.spec +++ b/multipath-tools.spec @@ -1,6 +1,6 @@ Name: multipath-tools Version: 0.8.4 -Release: 3 +Release: 4 Summary: Tools to manage multipath devices with the device-mapper License: GPLv2-or-later and LGPLv2+ URL: http://christophe.varoqui.free.fr/ @@ -23,17 +23,16 @@ Patch12: 0012-bugfix-ignore-for-clear-mismatch-key.patch Patch13: 0013-bugfix-flush-and-sync-before-reboot.patch Patch14: 0014-bugfix-RH-remove-local-disk-from-pathvec.patch Patch15: 0015-bugfix-lun-expansion-failure-when-there-is-offline-path.patch -Patch16: 0016-bugfix-some-memory-leaks-issues-in-libmpathpersist.patch -Patch17: 0017-bugfix-change-log-level-to-info-if-alua-is-not-support-by-s.patch -Patch18: 0018-bugfix-clear-mpp-path-reference-when-path-is-freed-otherwis.patch -Patch19: 0019-bugfix-libmultipath-fix-memory-leak-in-disassemble_map.patch -Patch20: 0020-fix-find-multipath-failure.patch -Patch21: 0021-change-kpartx-file-and-default-bindir.patch -Patch22: 0022-master-libmultipath-fix-use-after-free-when-iscsi-lo.patch -Patch23: 0023-libmultipath-warn-if-freeing-path-that-holds-mpp-hwe.patch -Patch24: 0024-libmultipath-warn-about-NULL-value-of-mpp-hwe.patch -Patch25: 0025-libmultipath-fix-mpp-hwe-handling-in-sync_paths.patch -Patch26: 0026-fix-boolean-value-with-json-c-0.14.patch +Patch16: 0016-bugfix-change-log-level-to-info-if-alua-is-not-support-by-s.patch +Patch17: 0017-bugfix-clear-mpp-path-reference-when-path-is-freed-otherwis.patch +Patch18: 0018-bugfix-libmultipath-fix-memory-leak-in-disassemble_map.patch +Patch19: 0019-fix-find-multipath-failure.patch +Patch20: 0020-change-kpartx-file-and-default-bindir.patch +Patch21: 0021-master-libmultipath-fix-use-after-free-when-iscsi-lo.patch +Patch22: 0022-libmultipath-warn-if-freeing-path-that-holds-mpp-hwe.patch +Patch23: 0023-libmultipath-warn-about-NULL-value-of-mpp-hwe.patch +Patch24: 0024-libmultipath-fix-mpp-hwe-handling-in-sync_paths.patch +Patch25: 0025-fix-boolean-value-with-json-c-0.14.patch BuildRequires: gcc, libaio-devel, userspace-rcu-devel, device-mapper-devel >= 1.02.89 BuildRequires: libselinux-devel, libsepol-devel, readline-devel, ncurses-devel, git BuildRequires: systemd-units, systemd-devel, json-c-devel, perl-interpreter, pkgconfig @@ -173,6 +172,12 @@ fi %changelog +* Fri Oct 16 2020 lixiaokeng - 0.8.4-4 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:remove patch that has been fix in 0.8.4 + * Fri Sep 25 2020 lixiaokeng - 0.8.4-3 - Type:bugfix - ID:NA -- Gitee