[PATCH 4/4] zfcp: fix: avoid race between fc_remote_port_add and scsi_add_device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Flush workqueue of a scsi host after a remote port for that host
is registered at the fc transport class. Otherwise immediate
registration of a scsi device on that host is racy.

Signed-off-by: Andreas Herrmann <aherrman@xxxxxxxxxx>

---

 drivers/s390/scsi/zfcp_erp.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

8ef4d7bd844a9ed4806bbfc18313c56045486608
diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c
index 8ed6fcb..e3c4bdd 100644
--- a/drivers/s390/scsi/zfcp_erp.c
+++ b/drivers/s390/scsi/zfcp_erp.c
@@ -3415,6 +3415,8 @@ zfcp_erp_action_cleanup(int action, stru
 						"(adapter %s, wwpn=0x%016Lx)\n",
 						zfcp_get_busid_by_port(port),
 						port->wwpn);
+			else
+				scsi_flush_work(adapter->scsi_host);
 		}
 		zfcp_port_put(port);
 		break;
-- 
0.99.9n-g5a22
-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux