fix nfs-blkmapd service core dump
This commit is contained in:
parent
eaf36c0cd6
commit
c0494a37be
44
0002-fix-coredump-in-bl_add_disk.patch
Normal file
44
0002-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
|
||||
Version: 2.5.1
|
||||
Release: 3
|
||||
Release: 4
|
||||
Epoch: 1
|
||||
Summary: The Linux NFS userland utility package
|
||||
License: MIT and GPLv2 and GPLv2+ and BSD
|
||||
@ -14,6 +14,7 @@ Source0: https://www.kernel.org/pub/linux/utils/nfs-utils/%{version}/%{name}-%{v
|
||||
|
||||
Patch0: 0000-systemd-idmapd-require-rpc-pipefs.patch
|
||||
Patch1: 0001-correct-the-statd-path-in-man.patch
|
||||
Patch2: 0002-fix-coredump-in-bl_add_disk.patch
|
||||
|
||||
BuildRequires: libevent-devel,libcap-devel, libtirpc-devel libblkid-devel
|
||||
BuildRequires: krb5-libs >= 1.4 autoconf >= 2.57 openldap-devel >= 2.2
|
||||
@ -222,6 +223,9 @@ fi
|
||||
%{_mandir}/*/*
|
||||
|
||||
%changelog
|
||||
* Tue Nov 30 2021 yanglongkang <yanglongkang@huawei.com> - 2.5.1-4
|
||||
- fix nfs-blkmapd service core dump
|
||||
|
||||
* Wed Nov 11 2020 lixiaokeng <lixiaokeng@huawei.com> - 2.5.1-3
|
||||
- add epoch to the version of help package required
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user