[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1575599644-15837-1-git-send-email-wangxidong_97@163.com>
Date: Fri, 6 Dec 2019 10:34:04 +0800
From: Xidong Wang <wangxidong_97@....com>
To: Xidong Wang <wangxidong_97@....com>,
Steffen Maier <maier@...ux.ibm.com>,
Benjamin Block <bblock@...ux.ibm.com>,
Heiko Carstens <heiko.carstens@...ibm.com>,
Vasily Gorbik <gor@...ux.ibm.com>,
Christian Borntraeger <borntraeger@...ibm.com>,
linux-s390@...r.kernel.org, linux-kernel@...r.kernel.org
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 <wangxidong_97@....com>
---
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
Powered by blists - more mailing lists