From patchwork Mon Oct 16 18:26:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 10009551 Return-Path: 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 C7CB0601D5 for ; Mon, 16 Oct 2017 18:26:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BEC3427C2D for ; Mon, 16 Oct 2017 18:26:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B3125285A5; Mon, 16 Oct 2017 18:26:15 +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 2EA4E28591 for ; Mon, 16 Oct 2017 18:26:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755200AbdJPS0O (ORCPT ); Mon, 16 Oct 2017 14:26:14 -0400 Received: from mail-by2nam01on0078.outbound.protection.outlook.com ([104.47.34.78]:59520 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754947AbdJPS0N (ORCPT ); Mon, 16 Oct 2017 14:26:13 -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=GMa33iyUxHl2y38khkZ+ngpe2mmFn0EncLMSP2CG4ew=; b=lvTswByra8WVFqVqn0E3ZV1lyw+XFT5BYPJssPVmEL3iE6rOibEhJfrhRVay3GaxEPe/pcAJmnYZ/MC6jUl87TfbHnKCJoX//wcKZA4lENQPwTA2ZsPiNZZ7E5ODLK0Suwg88jPIy32OFXqTYYEMv7CuE3xftxO4bC+GWKkCsHk= Received: from CO2PR07CA0073.namprd07.prod.outlook.com (2603:10b6:100::41) by SN4PR0701MB3824.namprd07.prod.outlook.com (2603:10b6:803:4f::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Mon, 16 Oct 2017 18:26:11 +0000 Received: from BL2FFO11OLC013.protection.gbl (2a01:111:f400:7c09::109) by CO2PR07CA0073.outlook.office365.com (2603:10b6:100::41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7 via Frontend Transport; Mon, 16 Oct 2017 18:26:11 +0000 Authentication-Results: spf=none (sender IP is 50.232.66.26) smtp.mailfrom=cavium.com; vger.kernel.org; dkim=none (message not signed) header.d=none; vger.kernel.org; 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 BL2FFO11OLC013.mail.protection.outlook.com (10.173.160.161) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.20.77.10 via Frontend Transport; Mon, 16 Oct 2017 18:26:09 +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; Mon, 16 Oct 2017 11:26:06 -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 v9GIQ6AG022209; Mon, 16 Oct 2017 11:26:06 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id v9GIQ5ak022208; Mon, 16 Oct 2017 11:26:05 -0700 From: "Madhani, Himanshu" To: , CC: , Subject: [PATCH 1/1] qla2xxx: Initialize Work element before requesting IRQs Date: Mon, 16 Oct 2017 11:26:05 -0700 Message-ID: <20171016182605.22174-1-himanshu.madhani@cavium.com> X-Mailer: git-send-email 2.12.0 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:50.232.66.26; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(346002)(376002)(2980300002)(428002)(199003)(189002)(5660300001)(101416001)(50226002)(305945005)(356003)(110136005)(50986999)(47776003)(86362001)(106466001)(4326008)(33646002)(316002)(189998001)(42186006)(5003940100001)(16586007)(36756003)(478600001)(87636003)(72206003)(105586002)(80596001)(48376002)(50466002)(8676002)(54906003)(81156014)(81166006)(1076002)(2906002)(8936002)(69596002); DIR:OUT; SFP:1101; SCL:1; SRVR:SN4PR0701MB3824; H:CAEXCH02.caveonetworks.com; FPR:; SPF:None; PTR:50-232-66-26-static.hfc.comcastbusiness.net; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11OLC013; 1:g6HINywgaLfnXYDO7kODgUOb5TzM7KlUzpQzCwb0ofqT3YtSAuTBWqmsk8NCwpJL7w1nlmqifufDJvpioFcn45LTo1Ln2JGQbrxYzRmY4M0G7w/r703YVhxffsOKTx7b X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f588df08-c216-4d3f-6da1-08d514c3602b X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:SN4PR0701MB3824; X-Microsoft-Exchange-Diagnostics: 1; SN4PR0701MB3824; 3:MCot42g5tC/LGj/7zI9iZaHRpfiTpkj/OUN7Y4KkpMX+/Kj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+C1J92vtTuMX9PQtHElZ98kEW+DYzh+szYEBxEwv+ZTxx73bNDi5t6yFsdVjVAWhNh+BUUjFfx3otsBmZeSjoTtELBCEt/mA1/X/w8j8/eM6+PDhVwqJJ03J44AINZQEMxBAk342rUNYq8LyZ+I+U9x/7Ta7riHhHSiMMOSIkvcUGn9aGgoRRNVdsWNhGMoJSE3K47cKFFLWeNMFwjwa37oM+tSoEBuSVCpH5IBw1b/M4qnA8oVjOTYPJ8h9WUGDTX4aL7Q6qJhnZY/2CcusGyfBvB3anOWsTFUl6PIe+tftb927wN1Ue8hGal8HZK2fRvJt3/G6yvP7bIkg7wdfLH5uuuCEFizZthW412hbAr5Lq/HMuOwTS5Aauof1ct/35CTZ8HL5Va07Owt9CcUmoPGmJ7+th X-Exchange-Antispam-Report-Test: UriScan:(9452136761055); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(100000703101)(100105400095)(3002001)(10201501046)(93006095)(93001095)(6041248)(20161123558100)(20161123560025)(20161123564025)(20161123562025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:SN4PR0701MB3824; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:SN4PR0701MB3824; X-Microsoft-Exchange-Diagnostics: 1; SN4PR0701MB3824; 4:XTfLvxy5aI9Verge7pyfenBMOTiwoJX+sk8iqH22HfIhgsDb40k2HcJ6hcHDJ8aqgZtHqmFqpAuML5L9oZkPedwLZCXVcdFMjx1EUJEKjsTD0i2LmS1NG5AXwvs0jVXZcdLzx1hJEdW2GxhBzBy+YEEhEDiHu2mstud0+p+DU5sFFREUoheRJzOrr0S4fTdFGRy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1tpuMJ1UKAaRXE4xt8YoIKratxtKIX3sS7SmN5mvi3b5qwD6GEVU5I/xBfxi77bvNxM/p21VhHOI1wh3Im62c7FZedvGsuoRTJx9oPJyw38ubTed+RAchzgErnkhIJ388FUB9KSwa6e/5D8JXDCpdZk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Oct 2017 18:26:09.6042 (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: SN4PR0701MB3824 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: Himanshu Madhani commit a9e170e28636 ("scsi: qla2xxx: Fix uninitialized work element") moved initialziation of work element earlier in the probe to fix call stack. However, it still leaves a window where interrupt can be generated before work element is initialized. Fix that window by Initializing work element before we are requesting IRQs. Fixes: a9e170e28636 ("scsi: qla2xxx: Fix uninitialized work element") Cc: # 4.13 Signed-off-by: Himanshu Madhani Signed-off-by: Quinn Tran --- Hi Martin, Please apply this patch to 4.14.0-rc6. This patch fixes a small window where user will see call stack with qla2xxx driver. Thanks, Himanshu drivers/scsi/qla2xxx/qla_os.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 937209805baf..3bd956d3bc5d 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c @@ -3061,6 +3061,8 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) host->max_cmd_len, host->max_channel, host->max_lun, host->transportt, sht->vendor_id); + INIT_WORK(&base_vha->iocb_work, qla2x00_iocb_work_fn); + /* Set up the irqs */ ret = qla2x00_request_irqs(ha, rsp); if (ret) @@ -3175,8 +3177,6 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) host->can_queue, base_vha->req, base_vha->mgmt_svr_loop_id, host->sg_tablesize); - INIT_WORK(&base_vha->iocb_work, qla2x00_iocb_work_fn); - if (ha->mqenable) { bool mq = false; bool startit = false;