2019-12-06 02:52:02

by Xidong Wang

[permalink] [raw]
Subject: [PATCH 1/1] scsi: zfcp: check qdio before use

In zfcp_fsf_fcp_cmnd(), zfcp_qdio_sbal_get(qdio) should
be checked before zfcp_fsf_req_create() is called.

Signed-off-by: Xidong Wang <[email protected]>
---
drivers/s390/scsi/zfcp_fsf.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c
index cf63916..8e460e3 100644
--- a/drivers/s390/scsi/zfcp_fsf.c
+++ b/drivers/s390/scsi/zfcp_fsf.c
@@ -2292,6 +2292,9 @@ int zfcp_fsf_fcp_cmnd(struct scsi_cmnd *scsi_cmnd)
if (scsi_cmnd->sc_data_direction == DMA_TO_DEVICE)
sbtype = SBAL_SFLAGS0_TYPE_WRITE;

+ if (zfcp_qdio_sbal_get(qdio))
+ goto out;
+
req = zfcp_fsf_req_create(qdio, FSF_QTCB_FCP_CMND,
sbtype, adapter->pool.scsi_req);

--
2.7.4