All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/1] scsi: libiscsi: fix NOP race condition
@ 2020-09-25 18:41 lduncan
  2020-09-25 18:41 ` [PATCH v2 1/1] " lduncan
  0 siblings, 1 reply; 6+ messages in thread
From: lduncan @ 2020-09-25 18:41 UTC (permalink / raw)
  To: linux-scsi
  Cc: linux-kernel, open-iscsi, martin.petersen, mchristi, hare, Lee Duncan

From: Lee Duncan <lduncan@suse.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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-10-20 16:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-25 18:41 [PATCH v2 0/1] scsi: libiscsi: fix NOP race condition lduncan
2020-09-25 18:41 ` [PATCH v2 1/1] " lduncan
2020-10-02 16:13   ` Lee Duncan
2020-10-08 17:11   ` Mike Christie
2020-10-08 20:54     ` Mike Christie
2020-10-20 16:55       ` Lee Duncan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.