lkml.org 
[lkml]   [2019]   [Dec]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/1] scsi: zfcp: check qdio before use
Date
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@163.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
\
 
 \ /
  Last update: 2019-12-06 03:50    [W:0.022 / U:35.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site