From patchwork Tue Apr 2 21:24:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Himanshu Madhani X-Patchwork-Id: 10882349 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DCF72922 for ; Tue, 2 Apr 2019 21:25:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C782A288BA for ; Tue, 2 Apr 2019 21:25:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BBD09288D2; Tue, 2 Apr 2019 21:25:49 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 659A2288BA for ; Tue, 2 Apr 2019 21:25:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726670AbfDBVZt (ORCPT ); Tue, 2 Apr 2019 17:25:49 -0400 Received: from mail-eopbgr800080.outbound.protection.outlook.com ([40.107.80.80]:38206 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726328AbfDBVZs (ORCPT ); Tue, 2 Apr 2019 17:25:48 -0400 Received: from BYAPR07CA0082.namprd07.prod.outlook.com (2603:10b6:a03:12b::23) by CY1PR07MB2538.namprd07.prod.outlook.com (2a01:111:e400:c636::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1750.16; Tue, 2 Apr 2019 21:25:47 +0000 Received: from CO1NAM05FT036.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e50::202) by BYAPR07CA0082.outlook.office365.com (2603:10b6:a03:12b::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1750.15 via Frontend Transport; Tue, 2 Apr 2019 21:25:46 +0000 Authentication-Results: spf=fail (sender IP is 199.233.58.38) smtp.mailfrom=marvell.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=fail action=none header.from=marvell.com; Received-SPF: Fail (protection.outlook.com: domain of marvell.com does not designate 199.233.58.38 as permitted sender) receiver=protection.outlook.com; client-ip=199.233.58.38; helo=CAEXCH02.caveonetworks.com; Received: from CAEXCH02.caveonetworks.com (199.233.58.38) by CO1NAM05FT036.mail.protection.outlook.com (10.152.96.149) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA) id 15.20.1771.6 via Frontend Transport; Tue, 2 Apr 2019 21:25:46 +0000 Received: from dut1171.mv.qlogic.com (10.112.88.18) by CAEXCH02.caveonetworks.com (10.67.98.110) with Microsoft SMTP Server (TLS) id 14.2.347.0; Tue, 2 Apr 2019 14:24:41 -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 x32LOfLT028512; Tue, 2 Apr 2019 14:24:41 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id x32LOfJs028511; Tue, 2 Apr 2019 14:24:41 -0700 From: Himanshu Madhani To: , CC: , Subject: [PATCH v2 02/15] qla2xxx: Set the qpair in SRB to NULL when SRB is released Date: Tue, 2 Apr 2019 14:24:21 -0700 Message-ID: <20190402212434.28469-3-hmadhani@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20190402212434.28469-1-hmadhani@marvell.com> References: <20190402212434.28469-1-hmadhani@marvell.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131987139466702394;(abac79dc-c90b-41ba-8033-08d666125e47);(abac79dc-c90b-41ba-8033-08d666125e47) X-Forefront-Antispam-Report: CIP:199.233.58.38;IPV:CAL;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(376002)(396003)(39860400002)(346002)(136003)(2980300002)(1110001)(1109001)(339900001)(189003)(199004)(105606002)(486006)(126002)(53936002)(2616005)(1076003)(476003)(26826003)(76176011)(36906005)(446003)(85426001)(356004)(87636003)(6666004)(47776003)(26005)(48376002)(5660300002)(11346002)(2906002)(50466002)(4744005)(8676002)(81156014)(36756003)(106466001)(51416003)(305945005)(81166006)(8936002)(42186006)(336012)(54906003)(50226002)(80596001)(69596002)(110136005)(86362001)(316002)(68736007)(16586007)(4326008)(97736004)(498600001);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR07MB2538;H:CAEXCH02.caveonetworks.com;FPR:;SPF:Fail;LANG:en;PTR:InfoDomainNonexistent;MX:1;A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7d71e487-4c5a-4828-6bea-08d6b7b1c540 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(5600139)(711020)(4605104)(2017052603328);SRVR:CY1PR07MB2538; X-MS-TrafficTypeDiagnostic: CY1PR07MB2538: X-Microsoft-Antispam-PRVS: X-Forefront-PRVS: 0995196AA2 X-Microsoft-Antispam-Message-Info: sujmChkfk4WDn3OjwunZdYm3VY5CVAlPsSBaEnEBRSCBTvdgicJFH/t5sM2mvx93aIttq0Sye4yXbaxVCyIdJu2Cpy4tAtOQacvMGSxqFiN4DYUwW4XucpEaoi/UpCM1i0OpuouRn5yP7Fuqjga/20c9kIgeZujkNzifNAiIYP/iJ0M29g3IfDB7nqxUTB4OqHrYjhj2Dx1gkW7xMYnHxjm4/6WgDaDOc9/YN/D72BFkSTBiz3E6W/1NgFERgza2n/fPLyKqSqBajUg3v48aD3e9YxFakDUWCcfr4+WNXc3l/4hNj5dtjLRDZ1I4D2p5mx/W0rtbFYo1d/Vn2Hd5fwfMt/RDbTQmO6mtA1RpxwHPklLSIVCpt0K1feyBUauxgB7Vf0a4yESuTLt+Ra/4mPrF9EjRnD/+93PS/Jz8eiU= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Apr 2019 21:25:46.3049 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7d71e487-4c5a-4828-6bea-08d6b7b1c540 X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;Ip=[199.233.58.38];Helo=[CAEXCH02.caveonetworks.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB2538 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Giridhar Malavali This patch sets QPair pointer to NULL to prevent abort command racing ahead of normal command completion handling during scsi_done call. Signed-off-by: Giridhar Malavali Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_inline.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/qla2xxx/qla_inline.h b/drivers/scsi/qla2xxx/qla_inline.h index 512c3c37b447..07c3f45d4bd7 100644 --- a/drivers/scsi/qla2xxx/qla_inline.h +++ b/drivers/scsi/qla2xxx/qla_inline.h @@ -240,6 +240,7 @@ qla2xxx_get_qpair_sp(scsi_qla_host_t *vha, struct qla_qpair *qpair, static inline void qla2xxx_rel_qpair_sp(struct qla_qpair *qpair, srb_t *sp) { + sp->qpair = NULL; mempool_free(sp, qpair->srb_mempool); QLA_QPAIR_MARK_NOT_BUSY(qpair); }