Projects
Eulaceura:Factory
libiscsi
_service:obs_scm:0021-Fix-segmentation-fault-pr...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:0021-Fix-segmentation-fault-problem.patch of Package libiscsi
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
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2