Skip to content

target/iscsi networkportal race fixes

Andy Grover linux-scsi 1 version Applied

Status from this message: Applied, squashed into a single bugfix patch, and adding a CC'ed to

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 2 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/3target/iscsi: Set np_thread_state to ACTIVE before adding to g_np_listdrivers/target/iscsi/iscsi_target.c+1 -00 replies
2/3target/iscsi: Convert np_lock from a spinlock to a mutexdrivers/target/iscsi/iscsi_target.c+11 -110 replies
3/3target/iscsi: hold np_lock mutex across adding new net portal to g_np_listdrivers/target/iscsi/iscsi_target.c+9 -50 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] target/iscsi networkportal race fixes

see https://bugzilla.redhat.com/show_bug.cgi?id=1055064

Summary: if thread doesn't run before 2nd identical portal is created, it misses the existing one and the kernel_bind returns an error.

The first one-line patch fixes the issue for a single thread creating multiple network portals via configfs.

The second two close the race between multiple threads creating network portals.

Testing: failing test script now works.

Regards -- Andy

Andy Grover (3):
target/iscsi: Set np_thread_state to ACTIVE before adding to
g_np_list
target/iscsi: Convert np_lock from a spinlock to a mutex target/iscsi: hold np_lock mutex across adding new net portal to
g_np_list

 drivers/target/iscsi/iscsi_target.c |   29 +++++++++++++++++------------
 1 files changed, 17 insertions(+), 12 deletions(-)