From d7ec64a10bda43ec6d8b84b58e01f584c3a1a438 Mon Sep 17 00:00:00 2001 From: shao_xuehua Date: Tue, 24 Oct 2023 17:04:29 +0800 Subject: [PATCH] fix segmentation fault when using "dmraid -h" on aarch64 (cherry picked from commit 6d3eed5fa9038614f8369699f9b13c6ca74ecf78) --- dmraid.spec | 7 +++++- ...fault-when-using-dmraid-h-on-aarch64.patch | 25 +++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 fix-segmentation-fault-when-using-dmraid-h-on-aarch64.patch diff --git a/dmraid.spec b/dmraid.spec index 333c1a7..157bb84 100644 --- a/dmraid.spec +++ b/dmraid.spec @@ -9,7 +9,7 @@ Summary: dmraid (Device-mapper RAID tool and library) Name: dmraid Version: 1.0.0.rc16 -Release: 54 +Release: 55 License: GPLv2+ Group: System Environment/Base URL: http://people.redhat.com/heinzm/sw/dmraid @@ -48,6 +48,8 @@ Patch16: 0016-dmraid-fix-destdir.patch Patch17: 0017-dmraid-fix-missing-destdir.patch Patch18: 0018-dmraid-fix-so-flags.patch +Patch19: fix-segmentation-fault-when-using-dmraid-h-on-aarch64.patch + %description DMRAID supports RAID device discovery, RAID set activation, creation, removal, rebuild and display of properties for ATARAID/DDF1 metadata on @@ -151,6 +153,9 @@ rm -rf $RPM_BUILD_ROOT %ghost /var/cache/logwatch/dmeventd/syslogpattern.txt %changelog +* Thu Sep 21 2023 shaoxuehua - 1.0.0.rc16-55 +- fix segmentation fault when using "dmraid -h" on aarch64 + * Tue Jun 29 2021 zhouwenpei - 1.0.0.rc16-54 - add buildrequire gcc. diff --git a/fix-segmentation-fault-when-using-dmraid-h-on-aarch64.patch b/fix-segmentation-fault-when-using-dmraid-h-on-aarch64.patch new file mode 100644 index 0000000..8bbf69e --- /dev/null +++ b/fix-segmentation-fault-when-using-dmraid-h-on-aarch64.patch @@ -0,0 +1,25 @@ +From 9dce5cd1afb90332b11b3185af9a3bf7c91ee64a Mon Sep 17 00:00:00 2001 +From: shao_xuehua +Date: Thu, 21 Sep 2023 11:27:15 +0800 +Subject: [PATCH] fix segmentation fault when using "dmraid -h" on aarch64 + +--- + tools/commands.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tools/commands.c b/tools/commands.c +index a3c77d2..b746935 100644 +--- a/tools/commands.c ++++ b/tools/commands.c +@@ -266,7 +266,7 @@ help(struct lib_context *lc, int arg) + "\t[--size [0-9]...[kKgG][bB]]\n" + "\t[--str[i[de]] [0-9]...[kK][bB]]\n" + "\t{--disk[s] \"device-path[, device-path...\"}\n", c); +- log_print(lc, "%s\t{-x|--remove RAID-set} \n"); ++ log_print(lc, "%s\t{-x|--remove RAID-set} \n", c); + log_print(lc, "%s\t{-R|--rebuild} RAID-set [drive_name]\n" + "\t[-u|--update_defer]", c); + log_print(lc, "%s\t[{-f|--format FORMAT}]\n" +-- +2.20.1 +