Sync each branch submit

This commit is contained in:
yanglongkang 2021-10-21 11:26:12 +08:00 committed by markeryang
parent f481c27d41
commit f3f5d0b3f1
2 changed files with 37 additions and 1 deletions

View File

@ -0,0 +1,29 @@
From dd2a61c9551ac5d2ac0c5902172fd8312edc22cb Mon Sep 17 00:00:00 2001
From: yanglongkang <yanglongkang@huawei.com>
Date: Tue, 9 Feb 2021 11:39:32 +0800
Subject: [PATCH] sg3_utils: fix memset coredump
alloc MX_ALLOC_LEN size mem to enc_stat_rsp for
solving coredump problem.
Signed-off-by: yanglongkang <yanglongkang@huawei.com>
---
src/sg_ses.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/sg_ses.c b/src/sg_ses.c
index 23fc3b9..cf344b7 100644
--- a/src/sg_ses.c
+++ b/src/sg_ses.c
@@ -5582,7 +5582,7 @@ main(int argc, char * argv[])
enumerate_work(op);
goto early_out;
}
- enc_stat_rsp = sg_memalign(op->maxlen, 0, &free_enc_stat_rsp, false);
+ enc_stat_rsp = sg_memalign(MX_ALLOC_LEN, 0, &free_enc_stat_rsp, false);
if (NULL == enc_stat_rsp) {
pr2serr("Unable to get heap for enc_stat_rsp\n");
goto err_out;
--
1.8.3.1

View File

@ -1,6 +1,6 @@
Name: sg3_utils
Version: 1.45
Release: 4
Release: 6
Summary: Utilities that send SCSI commands to devices.
License: GPL-2.0-or-later AND BSD
URL: http://sg.danny.cz/sg/sg3_utils.html
@ -10,6 +10,7 @@ Patch0: 0000-sg3_utils-1.37-rescan-scsi-findremapped-enhance.patch
Patch1: 0001-sg3_utils-1.37-rescan-downpress.patch
Patch2: 0002-bugfix-sg3_utils-fix-syntax-error.patch
Patch3: 0003-sg3_utils-1.42-delete-lun-rescan-scsi-bus-report-error.patch
Patch4: 0004-sg3_utils-fix-memset-coredump.patch
Provides: %{name}-libs
Obsoletes: %{name}-libs
@ -73,6 +74,12 @@ rm -rf $RPM_BUILD_ROOT/%{_libdir}/*.la
%{_mandir}/man8/*
%changelog
* Wed Nov 3 2021 yanglongkang <yanglongkang@huawei.com> - 1.45-6
- sync each branch submit
* Thu Oct 21 2021 yanglongkang <yanglongkang@huawei.com> - 1.45-5
- solve coredump problem
* Sat Jul 31 2021 chenyanpanHW <chenyanpan@huawei.com> - 1.45-4
- DESC: delete -Sgit from %autosetup, and delete BuildRequires git