Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp232866ybl; Thu, 5 Dec 2019 18:52:02 -0800 (PST) X-Google-Smtp-Source: APXvYqzYVeRwwwvW5CSWfUnJWJvApbhjLFRqqI68pfc6W4fiVcPhdpaEa7uLNqzdZLApZk4578Ig X-Received: by 2002:a9d:53c9:: with SMTP id i9mr9398532oth.172.1575600722587; Thu, 05 Dec 2019 18:52:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575600722; cv=none; d=google.com; s=arc-20160816; b=W++1BJA91PQ2FBCJp+WbHcefYGhOxQlIDLWfzsv4f1BmmwlN83vkPtaF7hVylZh8cP +6sS6nhL39LqkugYj2ltFGSQJVbiInY8xY8YiTfMIgZtCZkLgYwYNzgOunrB7PgTauOd SXENg2vvRIeIOuy3dhbplb1Gv0jR1tbwbBePkZmPcfPLLDEXmHJiAmt+s36P3rusyaSi HvPGhLd5V1x8ZCcWClp9+sl5aZn6rxxGIIgTn78oku5s5o2g0PiJIT+pNJmfDRMuQYXi k1Fv31rVlUJVDE6qb5PmaxL0FjZmFDDjldJQjITOJWGCN4ZL4PtyaBW/oFqtR2Kiiw/6 wpYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:to:from :dkim-signature; bh=a4CzE9P9Sv83fyUfeq1jc6MxRpP1ZXVGxEaARk3HmoY=; b=BDUtLuDgr9T+6DV4F+AZgjtFOJ47xCFuufreit3Q6QLc/GorNSU8qO3Q1+sQYAwLJD BYVHhxHkE9EQlRfe6wEeZvCoCxWRxce9RNN/4dhl1JRysr6ndRVz4SAldACBls8duSch 8O1RTaNvZlrXW/WreIP62dROt1zu/kYDK8ufKAJaPtI0luMG38Riyv9EUbVcvyZWi6Kd TeA5IjkGPA+IuS0gLoe7cNHCs23uw1pp9uCZ8Hr6YE2g39tcXTMLZJXKRy3RveNH1lHM nTkXMVmi/rLoLBPOuleJUmlSKWBYSXQ0p9i2UQprKX2bxmtVUnMlYrDg9MbMIaKF6ljr 7HXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=lyEBwfSl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p186si4683710oih.172.2019.12.05.18.51.50; Thu, 05 Dec 2019 18:52:02 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=lyEBwfSl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726534AbfLFCuY (ORCPT + 99 others); Thu, 5 Dec 2019 21:50:24 -0500 Received: from mail-m973.mail.163.com ([123.126.97.3]:46260 "EHLO mail-m973.mail.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726076AbfLFCuY (ORCPT ); Thu, 5 Dec 2019 21:50:24 -0500 X-Greylist: delayed 909 seconds by postgrey-1.27 at vger.kernel.org; Thu, 05 Dec 2019 21:50:22 EST DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id; bh=a4CzE9P9Sv83fyUfeq 1jc6MxRpP1ZXVGxEaARk3HmoY=; b=lyEBwfSl6RmafVlypvBzyXV3eoVhbBZ8e6 4IbwOxU3MrioIBM5WeNVzVGl9Ce91qR936Pj/SA8UEQkr40JPQIorjPiKR84Apsl AFHsfHDf8qx9gbQrJf2To1aqBmKvGqzpAanPU5TtvzvP8MedyZ0S/v1rAYn3I1Em 2kJkjpFuQ= Received: from localhost.localdomain (unknown [218.106.182.184]) by smtp3 (Coremail) with SMTP id G9xpCgD3+99EvuldgtBkAQ--.76S3; Fri, 06 Dec 2019 10:35:04 +0800 (CST) From: Xidong Wang To: Xidong Wang , Steffen Maier , Benjamin Block , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/1] scsi: zfcp: check qdio before use Date: Fri, 6 Dec 2019 10:34:04 +0800 Message-Id: <1575599644-15837-1-git-send-email-wangxidong_97@163.com> X-Mailer: git-send-email 2.7.4 X-CM-TRANSID: G9xpCgD3+99EvuldgtBkAQ--.76S3 X-Coremail-Antispam: 1Uf129KBjvdXoW7Xry8Gry5CFWfXFW3Cw15Arb_yoW3WFgE9r 97urn2qrWfCrs2krWUKw1UZryFkr4xurn3Crn3tayfZFnxJFZ7XF1vvFWDJw15Jw1jgwnr uw1qyFy09F17KjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IUbS4i5UUUUU== X-Originating-IP: [218.106.182.184] X-CM-SenderInfo: pzdqw5xlgr0wrbzxqiywtou0bp/1tbi8BiD81uoV8DXCAAAsj Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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