fix nfs-blkmapd service core dump
(cherry picked from commit a09e186102af86a5f2f1334c9aaa3730f7d51388)
This commit is contained in:
parent
99c0ca3be4
commit
2ecab62a97
44
0004-fix-coredump-in-bl_add_disk.patch
Normal file
44
0004-fix-coredump-in-bl_add_disk.patch
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
From c7e995c8a4a3985d1b315814d29e8d9211d6dc5e Mon Sep 17 00:00:00 2001
|
||||||
|
From: lixiaokeng <lixiaokeng@huawei.com>
|
||||||
|
Date: Tue, 30 Nov 2021 16:38:02 +0800
|
||||||
|
Subject: [PATCH 1/2] fix coredump in bl_add_disk
|
||||||
|
|
||||||
|
The serial->data is not malloced separately, so it can't be freed.
|
||||||
|
Just free(serial).
|
||||||
|
|
||||||
|
Signed-off-by: Lixiaokeng <lixiaokeng@huawei.com>
|
||||||
|
---
|
||||||
|
utils/blkmapd/device-discovery.c | 3 ---
|
||||||
|
1 file changed, 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/utils/blkmapd/device-discovery.c b/utils/blkmapd/device-discovery.c
|
||||||
|
index f5f9b10..2c50205 100644
|
||||||
|
--- a/utils/blkmapd/device-discovery.c
|
||||||
|
+++ b/utils/blkmapd/device-discovery.c
|
||||||
|
@@ -188,7 +188,6 @@ static void bl_add_disk(char *filepath)
|
||||||
|
|
||||||
|
if (disk && diskpath) {
|
||||||
|
if (serial) {
|
||||||
|
- free(serial->data);
|
||||||
|
free(serial);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
@@ -229,7 +228,6 @@ static void bl_add_disk(char *filepath)
|
||||||
|
disk->valid_path = path;
|
||||||
|
}
|
||||||
|
if (serial) {
|
||||||
|
- free(serial->data);
|
||||||
|
free(serial);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -242,7 +240,6 @@ static void bl_add_disk(char *filepath)
|
||||||
|
free(path);
|
||||||
|
}
|
||||||
|
if (serial) {
|
||||||
|
- free(serial->data);
|
||||||
|
free(serial);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
--
|
||||||
|
2.26.1.windows.1
|
||||||
|
|
||||||
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
Name: nfs-utils
|
Name: nfs-utils
|
||||||
Version: 2.5.4
|
Version: 2.5.4
|
||||||
Release: 3
|
Release: 4
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Summary: The Linux NFS userland utility package
|
Summary: The Linux NFS userland utility package
|
||||||
License: MIT and GPLv2 and GPLv2+ and BSD
|
License: MIT and GPLv2 and GPLv2+ and BSD
|
||||||
@ -16,6 +16,7 @@ Patch0: 0000-systemd-idmapd-require-rpc-pipefs.patch
|
|||||||
Patch1: 0001-correct-the-statd-path-in-man.patch
|
Patch1: 0001-correct-the-statd-path-in-man.patch
|
||||||
Patch2: 0002-nfs-utils-set-use-gss-proxy-1-to-enable-gss-proxy-by.patch
|
Patch2: 0002-nfs-utils-set-use-gss-proxy-1-to-enable-gss-proxy-by.patch
|
||||||
Patch3: 0003-idmapd-Fix-error-status-when-nfs-idmapd-exits.patch
|
Patch3: 0003-idmapd-Fix-error-status-when-nfs-idmapd-exits.patch
|
||||||
|
Patch4: 0004-fix-coredump-in-bl_add_disk.patch
|
||||||
|
|
||||||
BuildRequires: libevent-devel,libcap-devel, libtirpc-devel libblkid-devel
|
BuildRequires: libevent-devel,libcap-devel, libtirpc-devel libblkid-devel
|
||||||
BuildRequires: krb5-libs >= 1.4 autoconf >= 2.57 openldap-devel >= 2.2
|
BuildRequires: krb5-libs >= 1.4 autoconf >= 2.57 openldap-devel >= 2.2
|
||||||
@ -227,6 +228,9 @@ fi
|
|||||||
%{_mandir}/*/*
|
%{_mandir}/*/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Mar 7 2022 yanglongkang <yanglongkang@h-partners.com> - 2.5.4-4
|
||||||
|
- fix nfs-blkmapd service core dump
|
||||||
|
|
||||||
* Thu Feb 24 2022 Wu Bo <wubo40@huawei.com> - 2.5.4-3
|
* Thu Feb 24 2022 Wu Bo <wubo40@huawei.com> - 2.5.4-3
|
||||||
- idmapd Fix error status when nfs idmapd exits
|
- idmapd Fix error status when nfs idmapd exits
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user