fix segmentation fault problem
Signed-off-by: geruijun <geruijun@huawei.com>
This commit is contained in:
parent
0d55b0b1d6
commit
ae288cec04
34
0021-Fix-segmentation-fault-problem.patch
Normal file
34
0021-Fix-segmentation-fault-problem.patch
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
From 00310fdc2ff77fac84d871a76af67750eacb8594 Mon Sep 17 00:00:00 2001
|
||||||
|
From: geruijun <geruijun@huawei.com>
|
||||||
|
Date: Wed, 15 Jun 2022 10:06:40 +0800
|
||||||
|
Subject: [PATCH] Fix segmentation fault problem.
|
||||||
|
|
||||||
|
When execute iscsi_task_mgmt_lun_reset_async function,
|
||||||
|
pdus are already removed from waitpdu list. In iscsi_service
|
||||||
|
function, this will call iscsi_process_pdu and release
|
||||||
|
pdu from waitpdu again, which cause segmentation fault.
|
||||||
|
|
||||||
|
Whether waitpud list is NULL should be checked here to avoid
|
||||||
|
the problem.
|
||||||
|
|
||||||
|
Signed-off-by: geruijun <geruijun@huawei.com>
|
||||||
|
---
|
||||||
|
lib/pdu.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/lib/pdu.c b/lib/pdu.c
|
||||||
|
index 6fe70db..f9c0bc5 100644
|
||||||
|
--- a/lib/pdu.c
|
||||||
|
+++ b/lib/pdu.c
|
||||||
|
@@ -622,7 +622,7 @@ iscsi_process_pdu(struct iscsi_context *iscsi, struct iscsi_in_pdu *in)
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (is_finished) {
|
||||||
|
+ if (is_finished && iscsi->waitpdu != NULL) {
|
||||||
|
ISCSI_LIST_REMOVE(&iscsi->waitpdu, pdu);
|
||||||
|
iscsi->drv->free_pdu(iscsi, pdu);
|
||||||
|
}
|
||||||
|
--
|
||||||
|
1.8.3.1
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
Name: libiscsi
|
Name: libiscsi
|
||||||
Version: 1.19.0
|
Version: 1.19.0
|
||||||
Release: 8
|
Release: 9
|
||||||
Summary: Client-side library to implement the iSCSI protocol
|
Summary: Client-side library to implement the iSCSI protocol
|
||||||
Recommends: %{name}-utils
|
Recommends: %{name}-utils
|
||||||
License: LGPLv2+ and GPLv2+
|
License: LGPLv2+ and GPLv2+
|
||||||
@ -26,6 +26,7 @@ Patch17: 0017-Updata-iscsi-dd.c.patch
|
|||||||
Patch18: 0018-iscsi-swp-handle-setting-of-debug_level-correctly.patch
|
Patch18: 0018-iscsi-swp-handle-setting-of-debug_level-correctly.patch
|
||||||
Patch19: 0019-fix-iscsi-ls-parameter-parse.patch
|
Patch19: 0019-fix-iscsi-ls-parameter-parse.patch
|
||||||
Patch20: 0020-Check-return-value-of-scsi_malloc-in-order-to.patch
|
Patch20: 0020-Check-return-value-of-scsi_malloc-in-order-to.patch
|
||||||
|
Patch21: 0021-Fix-segmentation-fault-problem.patch
|
||||||
|
|
||||||
Source: https://github.com/sahlberg/%{name}/archive/%{version}.tar.gz
|
Source: https://github.com/sahlberg/%{name}/archive/%{version}.tar.gz
|
||||||
|
|
||||||
@ -127,6 +128,9 @@ This package contains utilities of %{name} to connect to iSCSI targets
|
|||||||
%{_bindir}/iscsi-test-cu
|
%{_bindir}/iscsi-test-cu
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jun 15 2022 Ruijun Ge <geruijun@huawei.com> - 1.19.0-9
|
||||||
|
- DESC: backport patch to solve segmentation fault problem
|
||||||
|
|
||||||
* Fri Jun 10 2022 Ruijun Ge <geruijun@huawei.com> - 1.19.0-8
|
* Fri Jun 10 2022 Ruijun Ge <geruijun@huawei.com> - 1.19.0-8
|
||||||
- DESC: backport patches to solve command parameter parse problem
|
- DESC: backport patches to solve command parameter parse problem
|
||||||
and dereference null pointer problem
|
and dereference null pointer problem
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user