Skip to content

Fix a race condition in the target driver

Maurizio Lombardi linux-scsi target-devel 2 versions Applied

Status from this message: Applied to 5.7/scsi-queue, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v1 Latest posting 2/23 patches 1 replyApplied
  2. v1 posting 1/23 patches 3 repliesSuperseded

Patches in v1 posting 2/2 Applied

#Subject and filesSizeRepliesApplied
1/3target: remove boilerplate codedrivers/target/iscsi/iscsi_target.c drivers/target/iscsi/iscsi_target.h+2 -450 replies
2/3target: fix target hang when multiple threads try to destroy the same iscsi session.drivers/target/iscsi/iscsi_target.c drivers/target/iscsi/iscsi_target_configfs.c drivers/target/iscsi/iscsi_target_login.c +1 more+30 -170 replies
3/3iscsi target: calling iscsit_stop_session() inside iscsit_close_session() has no effectdrivers/target/iscsi/iscsi_target.c+1 -20 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by.

PatchMatt Coleman
1/3
2/3T-b
3/3

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

Read the v1 thread

Cover letter [PATCH RESEND 0/3] Fix a race condition in the target driver

Multiple threads may try to destroy the same iscsi session structure by calling iscsit_close_session() and then end up hanging.

This patchset modifies the driver so the session structure is destroyed by iscsit_close_connection() when the last connection gets closed, thus preventing the race condition.

Maurizio Lombardi (3):
target: remove boilerplate code
target: fix target hang when multiple threads try to destroy the same
iscsi session.
iscsi target: calling iscsit_stop_session() inside
iscsit_close_session() has no effect

 drivers/target/iscsi/iscsi_target.c          | 82 ++++++--------------
 drivers/target/iscsi/iscsi_target.h          |  1 -
 drivers/target/iscsi/iscsi_target_configfs.c |  5 +-
 drivers/target/iscsi/iscsi_target_login.c    |  5 +-
 include/target/iscsi/iscsi_target_core.h     |  2 +-
 5 files changed, 32 insertions(+), 63 deletions(-)
Signature · 1 line
2.21.0