[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <cover.1601058301.git.lduncan@suse.com>
Date: Fri, 25 Sep 2020 11:41:47 -0700
From: <lduncan@...e.com>
To: linux-scsi@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, open-iscsi@...glegroups.com,
martin.petersen@...cle.com, mchristi@...hat.com, hare@...e.com,
Lee Duncan <lduncan@...e.com>
Subject: [PATCH v2 0/1] scsi: libiscsi: fix NOP race condition
From: Lee Duncan <lduncan@...e.com>
A customer that uses iSCSI NOPs extensively found a race
condition caused in part by the two-lock system used in
iscsi (a forward and a back lock), since sending an iSCSI
NOP uses the forward lock, and receiving one uses the
back lock. Because of this, processing of the "send"
can still be in progress when the "receive" occurs, on
a sufficiently fast multicore system.
To handle this case, we add a new state to the "ping_task"
pointer besides unassigned and assigned, called "invalid",
which means the "not yet completed sending". Tests show
this closes this race condition hole.
Changes since V1:
- Removed two redundant lines in iscsi_send_nopout()
- Updated commit text to be more clear
- Added this cover letter with even more info
Lee Duncan (1):
scsi: libiscsi: fix NOP race condition
drivers/scsi/libiscsi.c | 13 ++++++++++---
include/scsi/libiscsi.h | 3 +++
2 files changed, 13 insertions(+), 3 deletions(-)
--
2.26.2
Powered by blists - more mailing lists