Skip to content

Fix possible hangs and race conditions during login

Maurizio Lombardi target-devel 3 versions – Applied

Status from this message: Applied to 6.4/scsi-fixes, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 2 repliesApplied
  2. v23 patches 4 repliesSuperseded
  3. v13 patches 6 repliesSuperseded

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/3target: iscsi: fix hang in the iSCSI login codedrivers/target/iscsi/iscsi_target.c drivers/target/iscsi/iscsi_target_login.c drivers/target/iscsi/iscsi_target_nego.c +3 more+103 -930 replies
2/3target: iscsi: remove unused transport_timerinclude/target/iscsi/iscsi_target_core.h+0 -10 replies
3/3target: iscsi: prevent login threads from racing between each otherdrivers/target/iscsi/iscsi_target_nego.c+3 -10 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchMike Christie
SeriesR-b
1/3
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH V3 0/3] Fix possible hangs and race conditions during login

PATCH 1 fixes a possible hang when during a login operation the initiator stops sending data to the target and the login_work doesn't get scheduled.

PATCH 3 fixes a bug in iscsi_target_locate_portal(), in the error code path the login semaphore may end up being released even if no one called down() against it, this may allow multiple threads to access the semaphore-protected code.

v3: fix the comments' format

v2: the login timeout of 15 seconds now is relative to the entire
login operation and not per-PDU.

Maurizio Lombardi (3):
target: iscsi: fix hang in the iSCSI login code
target: iscsi: remove unused transport_timer
target: iscsi: prevent login threads from racing between each other

 drivers/target/iscsi/iscsi_target.c       |  2 -
 drivers/target/iscsi/iscsi_target_login.c | 63 ++-----------------
 drivers/target/iscsi/iscsi_target_nego.c  | 74 +++++++++++++----------
 drivers/target/iscsi/iscsi_target_util.c  | 51 ++++++++++++++++
 drivers/target/iscsi/iscsi_target_util.h  |  4 ++
 include/target/iscsi/iscsi_target_core.h  |  7 ++-
 6 files changed, 106 insertions(+), 95 deletions(-)
Signature · 1 line
2.31.1