Message ID | 20170531133402.16629-6-chad.dupuis@cavium.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show
Return-Path: <linux-scsi-owner@kernel.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0C45760390 for <patchwork-linux-scsi@patchwork.kernel.org>; Wed, 31 May 2017 13:34:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0700B20952 for <patchwork-linux-scsi@patchwork.kernel.org>; Wed, 31 May 2017 13:34:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EF797281F9; Wed, 31 May 2017 13:34:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6E7FA20952 for <patchwork-linux-scsi@patchwork.kernel.org>; Wed, 31 May 2017 13:34:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751201AbdEaNeq (ORCPT <rfc822;patchwork-linux-scsi@patchwork.kernel.org>); Wed, 31 May 2017 09:34:46 -0400 Received: from mail-cys01nam02on0089.outbound.protection.outlook.com ([104.47.37.89]:41385 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751164AbdEaNem (ORCPT <rfc822;linux-scsi@vger.kernel.org>); Wed, 31 May 2017 09:34:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=z2HmGY0vpWnfCktmpAMXMuseDg/pv/9LBgsaM41x2xs=; b=YxZ06yX4cjW8ooYtqXjTAQq4hpCEstXA5KeEUc/TNkzzhfUs5PUzPppl1YFcGKB7KMs5554yIYUVr0/o7vY3KRfz02gvziwLnXoaeitoZfUnKTazzUWh6Q6jcq0bzPsExNaeQD9TgYlcz7myB+4W5Va8OQwzzf/dUpDMxfWQai0= Received: from DM5PR07CA0033.namprd07.prod.outlook.com (10.168.109.19) by BN1PR07MB423.namprd07.prod.outlook.com (10.141.59.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1124.9; Wed, 31 May 2017 13:34:19 +0000 Received: from BL2FFO11OLC005.protection.gbl (2a01:111:f400:7c09::116) by DM5PR07CA0033.outlook.office365.com (2603:10b6:3:16::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1124.9 via Frontend Transport; Wed, 31 May 2017 13:34:19 +0000 Authentication-Results: spf=none (sender IP is 50.232.66.26) smtp.mailfrom=cavium.com; oracle.com; dkim=none (message not signed) header.d=none; oracle.com; dmarc=none action=none header.from=cavium.com; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) Received: from CAEXCH02.caveonetworks.com (50.232.66.26) by BL2FFO11OLC005.mail.protection.outlook.com (10.173.160.91) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.1101.12 via Frontend Transport; Wed, 31 May 2017 13:34:17 +0000 Received: from dut1171.mv.qlogic.com (172.29.51.171) by CAEXCH02.caveonetworks.com (10.17.4.29) with Microsoft SMTP Server id 14.2.347.0; Wed, 31 May 2017 06:34:03 -0700 Received: from dut1171.mv.qlogic.com (localhost [127.0.0.1]) by dut1171.mv.qlogic.com (8.14.7/8.14.7) with ESMTP id v4VDY3QL016684; Wed, 31 May 2017 06:34:03 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id v4VDY3ZV016683; Wed, 31 May 2017 06:34:03 -0700 From: "Dupuis, Chad" <chad.dupuis@cavium.com> To: <martin.petersen@oracle.com> CC: <linux-scsi@vger.kernel.org>, <james.bottomley@hansenpartnership.com>, <QLogic-Storage-Upstream@cavium.com> Subject: [PATCH V2 05/15] qedf: Check that fcport is offloaded before dereferencing pointers in initiate_abts|cleanup. Date: Wed, 31 May 2017 06:33:52 -0700 Message-ID: <20170531133402.16629-6-chad.dupuis@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20170531133402.16629-1-chad.dupuis@cavium.com> References: <20170531133402.16629-1-chad.dupuis@cavium.com> MIME-Version: 1.0 Content-Type: text/plain X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:50.232.66.26; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(39840400002)(39450400003)(39850400002)(39400400002)(39410400002)(2980300002)(428002)(199003)(189002)(9170700003)(33646002)(50986999)(54906002)(478600001)(76176999)(36756003)(6666003)(110136004)(38730400002)(86362001)(2906002)(107886003)(80596001)(2950100002)(50466002)(6916009)(5660300001)(101416001)(4326008)(48376002)(2351001)(8936002)(1076002)(87636003)(42186005)(305945005)(105586002)(106466001)(189998001)(8676002)(47776003)(356003)(81166006)(50226002)(5003940100001)(72206003); DIR:OUT; SFP:1101; SCL:1; SRVR:BN1PR07MB423; H:CAEXCH02.caveonetworks.com; FPR:; SPF:None; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11OLC005; 1:M6T0zJbMGJAzkhxdKFXqlyLKhvyfA3SXETWA9kdIKDBpmkzzHy3EmalnkqnXU/L6DB7imEpJ/hw9vseIkKpCP3S+3/+CSj5q9tBOSj6eiB/TABijUkJVs044IQ3LyyRBuL1p4aYeJbjt3d/jK6n56WOlpAOphqfjNnsSRFliVvom4ilhri34i9nQb+qpc1+s6+q+z+EGY5HVtdYm7yY4h8VpXWIhtiF+baBKdro8CCuIF5yd0Sxu52rlMIX3h8bajWTuzeUVTuqRHxzDD20BsxNlnWzF74zL7ybBS3eA0AqASje8PXrt1z/e52jyRKljq+uh3QyOSYK7PIOtAr6BNlSLdtZ75Kan3ECMzx47cV6qiz8fGPUeiz1ZtSv9De1f9S8dCmEbavEKurFTIoBvTRR4wcraQlEgoQwXhMSA1blHT52cRUZOiI//qWrQaA3hEXBiW6Uga8/T4WaYC5ipAg== X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN1PR07MB423: X-MS-Office365-Filtering-Correlation-Id: 50b97baa-49c3-44f9-7c45-08d4a829bce9 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(201703131423075)(201703031133081)(201702281549075); SRVR:BN1PR07MB423; X-Microsoft-Exchange-Diagnostics: 1; BN1PR07MB423; 3:WnNKEeQkrY4bt07pEvM1vuL/zBEa4af6R0DKFz6T+jjK8eIDh04ZTb3rnMHmhYujkz9xUxdRyb+BP238Az0s/5gwVJDqWPBEQDErZAXX5wi5AbilbE9D5HHFq5yvV4ZLqI4pQGPZF+p5AiagbC09eRLu4qJVvq4EVDrYkMzgzxhYcJ/iUH2Dq87gcjX1YvrK0m4wJ1d/CZD2qC8oMIb9zrWJc+AbiA66PaK3cZqadFuaN5w1HeuBBAJpDsy9WjpKOUYmV8S9+nehwScKMyl89/EK20VI/e2QS5jaogbLl11pbimAaraRx2hEK7YEhZYFCeSx29UXbZW8xkHg5glwYqs+ry1VH6aoqJEC/kX7G/6g8XbCLnItTpOWiO9JaecvaUDX2ljjIWWkk2Gezv8CcfrN0dKYnpyhBwdNMJULwNyTw535l+VhocmwTu1Sr/HCD1XCEcCQ/VK8zjke57OZsX8IpVu3vLk8NsczFp+xfFZSgaVG6BD5wP53sbnSNk3d X-Micros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zyVw14IrnNdjJEMH2s1hDDXC2UxZzGYJQVVfisuKh+05hhTi4bFxhmqETrY/yeffR2331R08Vwoioiy84Z8iDYF0D72RKeNw2RI+8ieZITVl2r6lFbv1B+qOk8FcKxRYNf3sgMqt1zaegEsdGSboSFuD4PTi34jxnvCAvOBNHVT4R/pGc8TJAjcAmZOnPzRXEDFTgB9Lgd0+nioGOofBrEjkIgqJTaH/HRyCzjL6BEH0747ROqiYBdlygjqdyDoybRLVh+D7e6mBzEIfRmv9TuF X-Microsoft-Antispam-PRVS: <BN1PR07MB423A51D7C6E7E014647EDC69EF10@BN1PR07MB423.namprd07.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700073)(100105000095)(100000701073)(100105300095)(100000702073)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(13018025)(13016025)(93006095)(93001095)(100000703073)(100105400095)(10201501046)(3002001)(6041248)(20161123558100)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123555025)(20161123560025)(6072148)(100000704073)(100105200095)(100000705073)(100105500095); SRVR:BN1PR07MB423; BCL:0; PCL:0; RULEID:(100000800073)(100110000095)(100000801073)(100110300095)(100000802073)(100110100095)(100000803073)(100110400095)(100000804073)(100110200095)(100000805073)(100110500095); SRVR:BN1PR07MB423; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN1PR07MB423; 4:y2kl2oAihOUTCiCrereO59ZW4AfU6A8qV7wo9g7ZJSU?= =?us-ascii?Q?uAx19WryWmEJrlCEifq19qjX0CxfocjdZRAeE5J3n8d0Vb/omkufy2OPSwiP?= =?us-ascii?Q?j7DC49Ntg/O4ZakJFCSlK55l797VnsrYPOje8B6t2nrQAhBU+U6ov3SCzwbl?= =?us-ascii?Q?1Dvj6OHCpLWuZ4+aRGHTzmfL7+C7KHlSt1VVE0SCJO5sXyGeikj50uBDjYvW?= =?us-ascii?Q?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0X6vmummkbMnK8Rn9StclWBwEQqp0rYdLtHSVT15DfwvaQu0tjBxfWAnmsQ== X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 May 2017 13:34:17.8414 (UTC) X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=711e4ccf-2e9b-4bcf-a551-4094005b6194; Ip=[50.232.66.26]; Helo=[CAEXCH02.caveonetworks.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1PR07MB423 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: <linux-scsi.vger.kernel.org> X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/scsi/qedf/qedf_io.c b/drivers/scsi/qedf/qedf_io.c index ca9097b..db16004 100644 --- a/drivers/scsi/qedf/qedf_io.c +++ b/drivers/scsi/qedf/qedf_io.c @@ -1476,8 +1476,8 @@ int qedf_initiate_abts(struct qedf_ioreq *io_req, bool return_scsi_cmd_on_abts) { struct fc_lport *lport; struct qedf_rport *fcport = io_req->fcport; - struct fc_rport_priv *rdata = fcport->rdata; - struct qedf_ctx *qedf = fcport->qedf; + struct fc_rport_priv *rdata; + struct qedf_ctx *qedf; u16 xid; u32 r_a_tov = 0; int rc = 0; @@ -1485,15 +1485,18 @@ int qedf_initiate_abts(struct qedf_ioreq *io_req, bool return_scsi_cmd_on_abts) struct fcoe_wqe *sqe; u16 sqe_idx; - r_a_tov = rdata->r_a_tov; - lport = qedf->lport; - + /* Sanity check qedf_rport before dereferencing any pointers */ if (!test_bit(QEDF_RPORT_SESSION_READY, &fcport->flags)) { - QEDF_ERR(&(qedf->dbg_ctx), "tgt not offloaded\n"); + QEDF_ERR(NULL, "tgt not offloaded\n"); rc = 1; goto abts_err; } + rdata = fcport->rdata; + r_a_tov = rdata->r_a_tov; + qedf = fcport->qedf; + lport = qedf->lport; + if (lport->state != LPORT_ST_READY || !(lport->link_up)) { QEDF_ERR(&(qedf->dbg_ctx), "link is not ready\n"); rc = 1; @@ -1729,6 +1732,13 @@ int qedf_initiate_cleanup(struct qedf_ioreq *io_req, return SUCCESS; } + /* Sanity check qedf_rport before dereferencing any pointers */ + if (!test_bit(QEDF_RPORT_SESSION_READY, &fcport->flags)) { + QEDF_ERR(NULL, "tgt not offloaded\n"); + rc = 1; + return SUCCESS; + } + qedf = fcport->qedf; if (!qedf) { QEDF_ERR(NULL, "qedf is NULL.\n");
If an fcport is not offloaded then the members of the qedf_rport struct are undefined which may cause a system crash. Signed-off-by: Chad Dupuis <chad.dupuis@cavium.com> --- drivers/scsi/qedf/qedf_io.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-)