Message ID | 20180226090117.1929-1-manish.rangankar@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 D0652602DC for <patchwork-linux-scsi@patchwork.kernel.org>; Mon, 26 Feb 2018 09:02:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BFA5229FED for <patchwork-linux-scsi@patchwork.kernel.org>; Mon, 26 Feb 2018 09:02:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BDEAF29FE4; Mon, 26 Feb 2018 09:02:10 +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 8774B2A0A0 for <patchwork-linux-scsi@patchwork.kernel.org>; Mon, 26 Feb 2018 09:01:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752282AbeBZJBY (ORCPT <rfc822;patchwork-linux-scsi@patchwork.kernel.org>); Mon, 26 Feb 2018 04:01:24 -0500 Received: from mail-co1nam03on0055.outbound.protection.outlook.com ([104.47.40.55]:40153 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752270AbeBZJBV (ORCPT <rfc822;linux-scsi@vger.kernel.org>); Mon, 26 Feb 2018 04:01:21 -0500 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=Y96/Asw64NbGHIa0FPNuYzhgnT/586h+vGmyv9z9k38=; b=jTniYLxBnN8ZFAC5FgGz4X7AtXYsgTjf2To9klzEtb9DkIqZCmv6A+36H/P3Vnl15hzGodL+NS567Jg1ImjzycNQLKR9H39yom4fx7r77PxiiYIdZEejKV9xYAxUx95pLjvoap9OXkJCDdMqptxr97ighe0tZRTpiVEoAb57I1o= Received: from SN4PR0701CA0007.namprd07.prod.outlook.com (10.161.192.145) by BY2PR07MB923.namprd07.prod.outlook.com (10.242.46.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.527.15; Mon, 26 Feb 2018 09:01:19 +0000 Received: from BY2FFO11FD005.protection.gbl (2a01:111:f400:7c0c::123) by SN4PR0701CA0007.outlook.office365.com (2603:10b6:803:28::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.527.15 via Frontend Transport; Mon, 26 Feb 2018 09:01:19 +0000 Authentication-Results: spf=fail (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: Fail (protection.outlook.com: domain of cavium.com does not designate 50.232.66.26 as permitted sender) receiver=protection.outlook.com; client-ip=50.232.66.26; helo=CAEXCH02.caveonetworks.com; Received: from CAEXCH02.caveonetworks.com (50.232.66.26) by BY2FFO11FD005.mail.protection.outlook.com (10.1.14.126) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.20.506.19 via Frontend Transport; Mon, 26 Feb 2018 09:01:19 +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, 26 Feb 2018 01:01:18 -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 w1Q91IpO001964; Mon, 26 Feb 2018 01:01:18 -0800 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id w1Q91HnM001963; Mon, 26 Feb 2018 01:01:17 -0800 From: Manish Rangankar <manish.rangankar@cavium.com> To: <martin.petersen@oracle.com>, <lduncan@suse.com>, <cleech@redhat.com> CC: <linux-scsi@vger.kernel.org>, <QLogic-Storage-Upstream@cavium.com> Subject: [PATCH] qedi: Fix kernel crash during port toggle. Date: Mon, 26 Feb 2018 01:01:17 -0800 Message-ID: <20180226090117.1929-1-manish.rangankar@cavium.com> X-Mailer: git-send-email 2.12.0 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)(39380400002)(396003)(39850400004)(346002)(376002)(2980300002)(1109001)(1110001)(339900001)(199004)(189003)(105606002)(8676002)(2201001)(85426001)(59450400001)(50226002)(51416003)(81156014)(316002)(81166006)(110136005)(54906003)(8936002)(50466002)(16586007)(47776003)(86362001)(107886003)(42186006)(356003)(69596002)(80596001)(1076002)(305945005)(336011)(106466001)(2906002)(48376002)(5660300001)(87636003)(26005)(4326008)(36756003)(186003)(72206003)(478600001)(1857600001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR07MB923; H:CAEXCH02.caveonetworks.com; FPR:; SPF:Fail; PTR:50-232-66-26-static.hfc.comcastbusiness.net; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD005; 1:jaaikOKHAL8Th2QgWCVUnEcWU2bXNPjWXzVppB6nXVg393MWv/vNvSnu53kWjtUtHS4PCg16tMjr3f+XuPGE17JIQzsmwzw28oaClmjYfsPSQicbF7xJSE9iShKpvP/i X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0986d7a6-481c-4f3b-ed04-08d57cf7804e X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060); SRVR:BY2PR07MB923; X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB923; 3:spj0cgZyBbXO2Fpf7TALqjQ4btO9cVtTUNvxOw597STTThgxOWbM/XCFZyjmLnin7e33HJWjAPM0IEWKpMHEkeBO1QUne5+F5fc3qE0/QUtTtETKFnjT65ncahiqZOPd8XOrVZaN0jUhI6WeVkqxVXeJWIqTolx+z0TQLO2E/WMC1/Y28Ux+Jhl7X0zIKSJsfv90IiceuV/TCu9gjtAfgalyBuWWlT1a+ygIg/1ilVZQgL7AcfEYkjsS2dAxvo2grG5foHZnBDGc0mIrq1RJu3iT5BXI3ibdFimK2qnrhOKf8u8sR2p1VgpyUMAN7/ialM0PuEZtzrNhUyoCdQMf9mXHVcpigN/EZvxjwPMR5B0=; 25:CfTcZgVT4h2PlIV4uLMuD7d0PfpL3SJ0TTa6xadYo22r+1Bmp7z8NfAEHyD6ypu/8UAW+yTB6qlWdBRZYFkYQxVAWpN1jO1mP9n2xqLfKtXDKP2ddI07Fv44mZcMLMlUmhIKtZQTH46swRh6DMr7wjSjECPMhdqyT45y+phKhewd8ddaR0d3jxL4oFzAV16aI7vCwx37t9f3cqY43MM5BWYB3YEyzJrpPZ3fD+nGLKKjH0sg6c8S5UG8MxXtZL13hY+Orqd7GUfvCFDbp2mfAglyoCXbrsqWLPptJ/o5Cm1+8VVadTdZsssLZXvVXwpfEZgLoJ2Mi27fJiteVdUKqw== X-MS-TrafficTypeDiagnostic: BY2PR07MB923: X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB923; 31:60M1jWCTWcUdaG8ITGVNLaV1FSvehDLhe2yyZVPqcSvNEmwR6lJNSg/iM7yGYftlQKuU6bkKA/DeSmR+B6Tos62s4bz2n8lsU7jJzw5VYdKPDlk6mZJrxunYI74RGC/52lEdgYyjpKQMtMmk+B6nl/+W5zrsJfqH7cQd204bWjMpOrgrhY2FULTBNICb5grDNXLy7/qLuBrLY2scjcscvj6md07+JrhziZCGVCvarKE=; 20:EWiAi0jHOTsLDwtM0AiRAl7/VCgUqyNW0FFWB8AexdCL9xgdV0sGbW8BW2u94Lzcvc0WR7wgKy/L4SQDpLby8O/WEAMhjUB05X18hmsIRN3YG8rk7MCC+eXvdtPZOBmZUFmHKxShcRKPkt+k7JhhLlnoZXEvR6J0St4mot66fs409mFBsIMFfzQG+cqwUumG7F5QGyZbIeh1V+2y+TzWTyOeqmM3bVs8ott8UemT5lZKo/bdP7aED1BuvpQoK+aV3KdzmOY/g/8rSZsYTY+jwkiO03EUrEYWggLdgblCAtVDWfTzydrrDHnQWmPuf2lFUpB8OuEWqS8gy6IEN4eeMetQ5Vmzm3FppyPkylgODCQ4s3180pgjQEpc87Yg/Rcone4pI8c1Z86/cTvF0EFrGDE1DfxxcwghBJjK/qDS4S6hbLCWsyS4MWm8HCr76HT8ZKoVUPIR6ydWSc36fJkk6x78qFmpiy8Budk/g4t57HbixcCR8G8HWY77m5QU5+pp X-Microsoft-Antispam-PRVS: <BY2PR07MB9238004099D5C7AFFB175B8E3C10@BY2PR07MB923.namprd07.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040501)(2401047)(8121501046)(5005006)(3002001)(93006095)(93001095)(10201501046)(3231220)(944501161)(52105095)(6041288)(20161123560045)(20161123564045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(6072148)(201708071742011); SRVR:BY2PR07MB923; BCL:0; PCL:0; RULEID:; SRVR:BY2PR07MB923; X-Microsoft-Exchange-Diagnostics: 1; BY2PR07MB923; 4:b46YGxgcCUYoUPtnTqg3C/vYin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/TsMjFScH6qJFiJuvmch81xhGc8RqoYqJviNeAs3hWiGu+9rE4HYY/wEGu4afOTsd28VoxZM7pw0Z9fxnw7cpHzE544jA/HoklE6FhzOJ5LaTf9GVzKSwVGkbdgo4MApe1H2X6Q/qgPKoBvgY0=; 24:TAHKthlwzebB+2suwPnS3d3hbPvA/sVsOS0hz6q9Eqgl+kOsZZhHUqONGZb9aIk3FLzjie+jARcNMqop1PzU+5lMYNQ/y6ecAY1+TB/JGRU=; 7:VSpA7TOnBZl69Ewqi8ul7BEfdXsl8lPYDjgfnNdtdyfGvfFggrREn67FtLKMjJqPjAX8O3pCNDpnMZO0qin/ylH4fswCs0u0z4sGUBICYlhCirF5pVQ7n5SRHFd3ngr9rrdv++Y1agiJScaTxaz87I0xLHFNAnou2nHxbHXtJjz1kiM4I/PnG3WNm6jkjGUxQLBJh5O5yknQl3xCZ811fgpnZZgPgvXSgQaEVKMPQbEbbVRoMBKfj0RceeL5LRwD SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Feb 2018 09:01:19.2187 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0986d7a6-481c-4f3b-ed04-08d57cf7804e 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: BY2PR07MB923 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 |
Manish,
> BUG: unable to handle kernel NULL pointer dereference at 0000000000000100
Applied to 4.16/scsi-fixes. Thanks!
diff --git a/drivers/scsi/qedi/qedi_fw.c b/drivers/scsi/qedi/qedi_fw.c index 667d769..d09afe1 100644 --- a/drivers/scsi/qedi/qedi_fw.c +++ b/drivers/scsi/qedi/qedi_fw.c @@ -762,6 +762,11 @@ static void qedi_process_cmd_cleanup_resp(struct qedi_ctx *qedi, iscsi_cid = cqe->conn_id; qedi_conn = qedi->cid_que.conn_cid_tbl[iscsi_cid]; + if (!qedi_conn) { + QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_INFO, + "icid not found 0x%x\n", cqe->conn_id); + return; + } /* Based on this itt get the corresponding qedi_cmd */ spin_lock_bh(&qedi_conn->tmf_work_lock);
BUG: unable to handle kernel NULL pointer dereference at 0000000000000100 [ 985.596918] IP: _raw_spin_lock_bh+0x17/0x30 [ 985.601581] PGD 0 P4D 0 [ 985.604405] Oops: 0002 [#1] SMP : [ 985.704533] CPU: 16 PID: 1156 Comm: qedi_thread/16 Not tainted 4.16.0-rc2 #1 [ 985.712397] Hardware name: Dell Inc. PowerEdge R730/0599V5, BIOS 2.4.3 01/17/2017 [ 985.720747] RIP: 0010:_raw_spin_lock_bh+0x17/0x30 [ 985.725996] RSP: 0018:ffffa4b1c43d3e10 EFLAGS: 00010246 [ 985.731823] RAX: 0000000000000000 RBX: ffff94a31bd03000 RCX: 0000000000000000 [ 985.739783] RDX: 0000000000000001 RSI: ffff94a32fa16938 RDI: 0000000000000100 [ 985.747744] RBP: 0000000000000004 R08: 0000000000000000 R09: 0000000000000a33 [ 985.755703] R10: 0000000000000000 R11: ffffa4b1c43d3af0 R12: 0000000000000000 [ 985.763662] R13: ffff94a301f40818 R14: 0000000000000000 R15: 000000000000000c [ 985.771622] FS: 0000000000000000(0000) GS:ffff94a32fa00000(0000) knlGS:0000000000000000 [ 985.780649] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 985.787057] CR2: 0000000000000100 CR3: 000000067a009006 CR4: 00000000001606e0 [ 985.795017] Call Trace: [ 985.797747] qedi_fp_process_cqes+0x258/0x980 [qedi] [ 985.803294] qedi_percpu_io_thread+0x10f/0x1b0 [qedi] [ 985.808931] kthread+0xf5/0x130 [ 985.812434] ? qedi_free_uio+0xd0/0xd0 [qedi] [ 985.817298] ? kthread_bind+0x10/0x10 [ 985.821372] ? do_syscall_64+0x6e/0x1a0 Signed-off-by: Manish Rangankar <manish.rangankar@cavium.com> --- drivers/scsi/qedi/qedi_fw.c | 5 +++++ 1 file changed, 5 insertions(+)