From patchwork Tue Mar 5 10:58:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saurav Kashyap X-Patchwork-Id: 10839275 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 3EF6E1869 for ; Tue, 5 Mar 2019 10:59:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2BF3A2B2A9 for ; Tue, 5 Mar 2019 10:59:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 208E32B352; Tue, 5 Mar 2019 10:59:36 +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 AD5FF2B2A9 for ; Tue, 5 Mar 2019 10:59:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727473AbfCEK7f (ORCPT ); Tue, 5 Mar 2019 05:59:35 -0500 Received: from mail-eopbgr730062.outbound.protection.outlook.com ([40.107.73.62]:39205 "EHLO NAM05-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727439AbfCEK7f (ORCPT ); Tue, 5 Mar 2019 05:59:35 -0500 Received: from BYAPR07CA0018.namprd07.prod.outlook.com (2603:10b6:a02:bc::31) by DM6PR07MB4377.namprd07.prod.outlook.com (2603:10b6:5:bf::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1665.19; Tue, 5 Mar 2019 10:59:32 +0000 Received: from BY2NAM05FT031.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e52::209) by BYAPR07CA0018.outlook.office365.com (2603:10b6:a02:bc::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1665.18 via Frontend Transport; Tue, 5 Mar 2019 10:59:32 +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 BY2NAM05FT031.mail.protection.outlook.com (10.152.100.168) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA) id 15.20.1686.5 via Frontend Transport; Tue, 5 Mar 2019 10:59:32 +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, 5 Mar 2019 02:59:30 -0800 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 x25AxUOw013256; Tue, 5 Mar 2019 02:59:30 -0800 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id x25AxUdp013255; Tue, 5 Mar 2019 02:59:30 -0800 From: Saurav Kashyap To: CC: , Subject: [PATCH 09/26] qedf: Add missing fc_disc_init call after allocating lport. Date: Tue, 5 Mar 2019 02:58:44 -0800 Message-ID: <20190305105901.13185-10-skashyap@marvell.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20190305105901.13185-1-skashyap@marvell.com> References: <20190305105901.13185-1-skashyap@marvell.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131962571724121953;(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)(39860400002)(396003)(376002)(346002)(136003)(2980300002)(1110001)(1109001)(339900001)(189003)(199004)(2906002)(81166006)(356004)(8936002)(80596001)(8676002)(6666004)(81156014)(68736007)(26005)(97736004)(48376002)(4326008)(6862004)(50466002)(50226002)(53936002)(486006)(1076003)(2616005)(69596002)(85426001)(126002)(476003)(105606002)(498600001)(106466001)(26826003)(36906005)(446003)(54906003)(47776003)(87636003)(16586007)(2351001)(76176011)(42186006)(86362001)(336012)(11346002)(4744005)(5660300002)(51416003)(36756003)(316002)(305945005);DIR:OUT;SFP:1101;SCL:1;SRVR:DM6PR07MB4377;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: a1c5fc40-e7dd-487e-f216-08d6a159a5b9 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(5600127)(711020)(4605104)(2017052603328);SRVR:DM6PR07MB4377; X-MS-TrafficTypeDiagnostic: DM6PR07MB4377: X-Microsoft-Antispam-PRVS: X-Forefront-PRVS: 0967749BC1 X-Microsoft-Exchange-Diagnostics: 1;DM6PR07MB4377;23:oYrNDUYaaOUT7whz0qw73m8oNb+L1j2LyRfZXmJ0+srQy2nPf3ZGjyZIYgC9x7/yVBn2IlKyGDvCm+7Rq6PqY5dHPJUWMzrcpgHU93kjrlFgnwX2eAs39tEdQRDIieEuCWFC1TsOU5VbwPXenDfM4fhJQ4yYK/ei1YkkdI+BTD/LazBII8sQYaVMbLi72siHUUx6dgqKIcb6De02jY/rL+w0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soft-Antispam-Message-Info: LcR3U8cVACmyMSX2xTs7dUqbOQoLxAtY7YMEO1NotdBTDpcGk+fBUszHHQCN5y8jE5XVjvuvjYwWmBlS8YfD2vIcKm/ktmEtp0FFGiTDzs9lGrEwThoeVqLr4Xb48N8xrbYN+aE5NOw5Y3QltxVqlL/G38Hhb1R8IeYX6uKXTrx89PYhmrpFi7LdX+sQN+NF51nBOqjnoGCIupNKvl1pqr55JjrkGS18glafOiKHKAZigPuNT1F/sFLUfSdWpCaadds4AkzpntTkN0L01D9BvFo2aYZuSiU+u5UMyvyPoFvA1/YzaPtyIiNqRAYmWe5yKCYB7mXS9tdIuayygoqDx+oSRod3qoyHKVGZ0v2ZlooW+rBAaonNvnPBAhZJstf62W0LPAS5XjqDGhNIKjk4AUWYMauZa8UIABzWXkZ4xWg= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2019 10:59:32.1569 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a1c5fc40-e7dd-487e-f216-08d6a159a5b9 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: DM6PR07MB4377 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: Chad Dupuis When receiving an unsolicited frame we could crash on a list traversal in fc_rport_lookup while searching the rport which is associated with our lport. Initialize the lport's discovery node after allocating the lport in __qedf_probe(). Signed-off-by: Chad Dupuis Signed-off-by: Saurav Kashyap --- drivers/scsi/qedf/qedf_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c index 3fd8107..dee6fef 100644 --- a/drivers/scsi/qedf/qedf_main.c +++ b/drivers/scsi/qedf/qedf_main.c @@ -3042,6 +3042,8 @@ static int __qedf_probe(struct pci_dev *pdev, int mode) goto err0; } + fc_disc_init(lport); + /* Initialize qedf_ctx */ qedf = lport_priv(lport); qedf->lport = lport;