Message ID | 20180116044653.20696-3-himanshu.madhani@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 644B8601E7 for <patchwork-linux-scsi@patchwork.kernel.org>; Tue, 16 Jan 2018 04:47:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4FFB927FAE for <patchwork-linux-scsi@patchwork.kernel.org>; Tue, 16 Jan 2018 04:47:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 44A2B27FB3; Tue, 16 Jan 2018 04:47:08 +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 DA20127FAE for <patchwork-linux-scsi@patchwork.kernel.org>; Tue, 16 Jan 2018 04:47:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751325AbeAPErG (ORCPT <rfc822;patchwork-linux-scsi@patchwork.kernel.org>); Mon, 15 Jan 2018 23:47:06 -0500 Received: from mail-cys01nam02on0075.outbound.protection.outlook.com ([104.47.37.75]:7968 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751098AbeAPErB (ORCPT <rfc822;linux-scsi@vger.kernel.org>); Mon, 15 Jan 2018 23:47:01 -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=UGiHpKkzc9FAPJPY5iGw4BfTQDPPSoY6OBTbhz0r63A=; b=Q4yWNc+nQeQUVaEtkRGxhVCnS1FIlycg6xtBtmwhwTOUJ3jqM6BkReq6MtkDPY2Cl1ubW3e0UqrVq1PJEn/F/i7SfyecuaA4+Tsp5IA95SM2WkCOMV8nNUkveLgdmSsm4naBMhCMb0MZbqMzr+VcwRPtsEpk0408aUMJpU2LI+Q= Received: from SN4PR0701CA0013.namprd07.prod.outlook.com (10.161.192.151) by BLUPR0701MB1937.namprd07.prod.outlook.com (10.163.121.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.407.7; Tue, 16 Jan 2018 04:47:00 +0000 Received: from BN1BFFO11FD034.protection.gbl (2a01:111:f400:7c10::1:143) by SN4PR0701CA0013.outlook.office365.com (2603:10b6:803:28::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.407.7 via Frontend Transport; Tue, 16 Jan 2018 04:46:59 +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 BN1BFFO11FD034.mail.protection.outlook.com (10.58.144.97) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.20.345.12 via Frontend Transport; Tue, 16 Jan 2018 04:46:59 +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, 15 Jan 2018 20:46:54 -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 w0G4kscA020739; Mon, 15 Jan 2018 20:46:54 -0800 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id w0G4ksik020738; Mon, 15 Jan 2018 20:46:54 -0800 From: Himanshu Madhani <himanshu.madhani@cavium.com> To: <James.Bottomley@HansenPartnership.com>, <martin.petersen@oracle.com> CC: <himanshu.madhani@cavium.com>, <linux-scsi@vger.kernel.org> Subject: [PATCH 2/8] qla2xxx: Fix recursion while sending terminate exchange Date: Mon, 15 Jan 2018 20:46:47 -0800 Message-ID: <20180116044653.20696-3-himanshu.madhani@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20180116044653.20696-1-himanshu.madhani@cavium.com> References: <20180116044653.20696-1-himanshu.madhani@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)(376002)(346002)(39860400002)(396003)(39380400002)(2980300002)(1110001)(1109001)(339900001)(199004)(189003)(48376002)(50466002)(16586007)(305945005)(47776003)(87636003)(26005)(316002)(4326008)(85426001)(42186006)(86362001)(50226002)(8936002)(8676002)(81156014)(81166006)(105606002)(106466001)(59450400001)(76176011)(1076002)(110136005)(54906003)(2906002)(51416003)(356003)(6666003)(5660300001)(478600001)(72206003)(2950100002)(80596001)(69596002)(36756003); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1937; 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; BN1BFFO11FD034; 1:epDyoKavB8NgdwsSpKjQNxJFM3wIWkvJSy45NUIr/6xV18eoUmj3R/QlQpJeAXGByx37fPDGsJuGdolAB2CI3llFaOK0NZN0E/EXpDSSSc+VSkdlDw/6uuIKChUSE3dU X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d9b05f61-92a0-4447-6868-08d55c9c2e14 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(4534125)(4602075)(4627221)(201703031133081)(201702281549075)(2017052603307)(7153060); SRVR:BLUPR0701MB1937; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1937; 3:JWoMMdTcAYZZnNyIwVSFVLOhH8Vn7tvCJxPF5H3IVMgdKLHM+5x3c6anQefNQq9Znj08ai8D/OszsVsnWGQew+DDwt8DgBeQRorHGPyr2Z2qc5lg8ZZphNWETSsedwx6we68XkyqJIoMi1HlnGK9eUasfqcHS2KGnj/0zmvXhwAGWetr78i3BAdf9uWzTTcoA1RJ1ALXM0l0a+Xv5ujhip9PFNp18sJJwrSyGDjJ5mvZOrScGhdJsGFNQECmAh0PqVx3hNe+3GduMzBqwOuWTuvZaLkFM8I7YYF6deYq1r9wDGfD1TUtQu4ee7KKMxTKOHobPjUeNpGevPPSDjt4Xw==; 25:v10s+8cjFkm1qY+DmRbDi14+LyXBKfnQbPPhlK/LxwWB0yN6oOvVvEyqnu6MM6UYgwWcdO2lAui+lsptDFJZbgvCnKwq1YuzKzc/4iRhn7ynKGsmQkQdSSWXzNBLJ4Lxn70icSqNbI4wEmO4eUxJtpPFyNvNk9llQAZwlObZu1Idyj87Q1UXik7vM/5C727iQXOVSlJsWXlaGjTvrdrvIiJuthcApRcyiEGyGO4geF6Nm2l3UCV7xzBaHYD3oIawVR3AI0eW39jHpCIqZMfbiAHLfYFWPjAffY1IRxbXVTXSru7wnRmz7zOZKP+ItufaY/PlaTk/NSVQGz5AlTQobA==; 31:LdfjusExjZcizXmrFZSE96Sbe/ChCVarJWfW7li7y4ickTiXHMQmBXXuOayHD+QEQS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X-Microsoft-Antispam-PRVS: <BLUPR0701MB19371DEE4D9377828C1A320AF5EA0@BLUPR0701MB1937.namprd07.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(9452136761055); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3231023)(944501161)(3002001)(6041268)(20161123560045)(20161123562045)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:BLUPR0701MB1937; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:BLUPR0701MB1937; X-Forefront-PRVS: 0554B1F54F X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0701MB1937; 23:bPJ+j7uKcPS9J/QRs/al9adthBoL7keJ1s5FfCo?= =?us-ascii?Q?DMmtWYC5YyzfzXuUPfFiRg3iccmPxQsXL5MAMTxRtunqTxi398RAoO6Nn+2D?= =?us-ascii?Q?GncLVqIuOrT54AwGpmTooQuO6PZoxxG6n++Oj4PzJoyXi/FvRkiG7Rg0RdvH?= =?us-ascii?Q?9KEBmq8OZ2MuTmVCwIrWs7bVxk5z5Ndqx6J23Dk5hQXLFqeRekRApI9B5ZU5?= =?us-ascii?Q?8m1Ln/0MEQv5SEyHx/ZesiC3hMg45TaKqF3A0/JcjiiXYyDAo1tPo1gr8+dY?= =?us-ascii?Q?wPUd7XR6vwb8ww4M9ogL87WM5HmHQX1I+ZT8S2lGgFPHoI+wmAqhtju8vx9T?= =?us-ascii?Q?+7XjVQLMo2wPyNhvmUxLBQGwWNKYmERLKa4l4rhFzlX187d5ig1JmBK4MUcm?= =?us-ascii?Q?DsBhr8T9wO6xZLiu81+mmOe0Mb5n5rZ1kDcEexFmJn3i2ZHiMarT1TCvlrOf?= =?us-ascii?Q?Md+2OyokIuyWvv+C+A8v11zGd7CDk/z7vVn0rZPMmtSYbBaGsz+aO09jLJC2?= =?us-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tnaISNZqptmKxYTaj3fr7tmeiBejSI2PO2IY+mop5sxiiR3Y3pKm0=; 5:4TtCDUKgg6p22CDPSfX+eREHa2rsr7VpzEUDfy4zHAAAOfdgOPemPgouMp4Q+1wBCVEmDqeEZbPHWhT05OY/GYyb7VJHCU6XkB15sZGqdkiASrRw4KA83NJ4p+vir99gA/wwmcRBpGCfUEbWw0C8BH1ranGGNTa987ZezSHMNUA=; 24:4SnZb/2KwjrE6QHu3pTHP9E3ANjtgiF6b+o5y97aOjFBbFsssPHs4GAQ2Yu70M6Qgnl2SyMG4a/jlf9CWVHVTFWVH8QPdV23Lo2lQnBC21I=; 7:3iuhXfE+3pnAs1RFwRttNnyxVL13Co7he0GYmgXM4XYlNUcy09ytV8FNHi5cVE6KCDpfJMIbKTahXakW7bsV1dOH0T7dVENCRzg2P0+HOMuIpqteeyjELdjggMOrWDETsHTYuHiTQUdYDNLZknjGV2J5fZh61elp9jLjTbPJiUdl0LuoNL9pON84UfbJuFMzH6R23Z24G8KZ4XtjRO9NjVOwWS6SHgGRmoTH7KBqCmNgu5UlESow+h+Im4m8H6fa SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jan 2018 04:46:59.6948 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d9b05f61-92a0-4447-6868-08d55c9c2e14 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: BLUPR0701MB1937 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/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index 0d3c3f647f91..cc80e57675e4 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -3756,7 +3756,7 @@ static int qlt_term_ctio_exchange(struct qla_qpair *qpair, void *ctio, term = 1; if (term) - qlt_term_ctio_exchange(qpair, ctio, cmd, status); + qlt_send_term_exchange(qpair, cmd, &cmd->atio, 1, 0); return term; }
During error test case where switch port status is toggled from enable to disable, following stack trace is seen which indicates recursion trying to send terminate exchange. This regression was introduced by commit 82de802ad46e ("scsi: qla2xxx: Preparation for Target MQ.") BUG: stack guard page was hit at ffffb96488383ff8 (stack is ffffb96488384000..ffffb96488387fff) BUG: stack guard page was hit at ffffb964886c3ff8 (stack is ffffb964886c4000..ffffb964886c7fff) kernel stack overflow (double-fault): 0000 [#1] SMP qlt_term_ctio_exchange+0x9c/0xb0 [qla2xxx] qlt_term_ctio_exchange+0x9c/0xb0 [qla2xxx] qlt_term_ctio_exchange+0x9c/0xb0 [qla2xxx] qlt_term_ctio_exchange+0x9c/0xb0 [qla2xxx] qlt_term_ctio_exchange+0x9c/0xb0 [qla2xxx] Fixes: 82de802ad46e ("scsi: qla2xxx: Preparation for Target MQ.") Cc: <stable@vger.kernel.org> #4.10 Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com> --- drivers/scsi/qla2xxx/qla_target.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)