From patchwork Thu Sep 27 05:05:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Madhani, Himanshu" X-Patchwork-Id: 10617241 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 54AA2180E for ; Thu, 27 Sep 2018 05:07:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4365D2B199 for ; Thu, 27 Sep 2018 05:07:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 37BF92B247; Thu, 27 Sep 2018 05:07:03 +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,DKIM_SIGNED, DKIM_VALID,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 A78F92B199 for ; Thu, 27 Sep 2018 05:07:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726639AbeI0LXX (ORCPT ); Thu, 27 Sep 2018 07:23:23 -0400 Received: from mail-by2nam03on0047.outbound.protection.outlook.com ([104.47.42.47]:24474 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726590AbeI0LXW (ORCPT ); Thu, 27 Sep 2018 07:23:22 -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:X-MS-Exchange-SenderADCheck; bh=LHUxP11l0yNI7qG+f8Z7UOTuWIG5n7Ca/AIv2XS0EOk=; b=krIvNlsNLFaWVYLX1zS3ZHsVaSGxyy84YPlOaP/MlUWN6hewztiVuLisPBeLclYgv2zVdmEN/9bRbo2+6fTDsVuH8qFV1QSYblTzhyteiHKXTWritSIMAnnGDwycKNGYUn4snN7/H8LlBw+csU9hdK10l77V/c7K2rATvPcqeXg= Received: from CO2PR07CA0070.namprd07.prod.outlook.com (2603:10b6:100::38) by SN6PR07MB4397.namprd07.prod.outlook.com (2603:10b6:805:58::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1143.17; Thu, 27 Sep 2018 05:05:41 +0000 Received: from DM3NAM05FT007.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e51::209) by CO2PR07CA0070.outlook.office365.com (2603:10b6:100::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1164.20 via Frontend Transport; Thu, 27 Sep 2018 05:05:41 +0000 Authentication-Results: spf=pass (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=bestguesspass action=none header.from=cavium.com; Received-SPF: Pass (protection.outlook.com: domain of cavium.com designates 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 DM3NAM05FT007.mail.protection.outlook.com (10.152.98.113) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.20.1185.5 via Frontend Transport; Thu, 27 Sep 2018 05:05:41 +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; Wed, 26 Sep 2018 22:05:21 -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 w8R55K19007210; Wed, 26 Sep 2018 22:05:20 -0700 Received: (from root@localhost) by dut1171.mv.qlogic.com (8.14.7/8.14.7/Submit) id w8R55KRM007209; Wed, 26 Sep 2018 22:05:20 -0700 From: Himanshu Madhani To: , CC: , Subject: [PATCH 7/8] qla2xxx: Fix for double free of SRB structure used in Async switch query commands Date: Wed, 26 Sep 2018 22:05:17 -0700 Message-ID: <20180927050518.7147-8-himanshu.madhani@cavium.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: <20180927050518.7147-1-himanshu.madhani@cavium.com> References: <20180927050518.7147-1-himanshu.madhani@cavium.com> 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)(396003)(376002)(39850400004)(346002)(136003)(2980300002)(438002)(189003)(199004)(446003)(2616005)(6666003)(50466002)(8676002)(48376002)(11346002)(1076002)(26005)(356003)(4326008)(5660300001)(44832011)(2906002)(186003)(50226002)(72206003)(86362001)(126002)(476003)(486006)(69596002)(8936002)(110136005)(316002)(42186006)(106002)(54906003)(16586007)(76176011)(51416003)(80596001)(47776003)(81166006)(336012)(81156014)(14444005)(305945005)(34290500001)(87636003)(478600001)(36756003)(106466001);DIR:OUT;SFP:1101;SCL:1;SRVR:SN6PR07MB4397;H:CAEXCH02.caveonetworks.com;FPR:;SPF:Pass;LANG:en;PTR:50-232-66-26-static.hfc.comcastbusiness.net;MX:1;A:1; X-Microsoft-Exchange-Diagnostics: 1;DM3NAM05FT007;1:PVSS277e9OuOvt3B7ZSaGT5TlgL/TNDyRkJNDhnCHLxcWzga1SbW0U4vtwQevEYTnRrQj/92964cnjLsmwmvuVHMDBmRI5rPfFLHPzF4J39ZV2umur6X+A8b5bgC+ypt X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8aa93922-c588-4be3-d278-08d62436dfa0 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534165)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4608076)(2017052603328)(7153060);SRVR:SN6PR07MB4397; X-Microsoft-Exchange-Diagnostics: 1;SN6PR07MB4397;3:+TZ5vWb5iT01OvezasfEqzale1JujhlGD962oZI6q3H4xwQ4qM5nVKDhNMUvMdAi3sl+EY+g6ntnn6Nq1kQqARKi8ucEuyN5O7UDtYwKnPLuaywvORWGBEc6BBNajoFQ9hmGUVo0etdOrl6WlBgqwF4WyvNB1rKgZrUjaSVj/8LFCrazD29mkrHSoOGCOeAV239zLF0GhoXPSlj3gYwqvldBUSlCCT8pqyhPsjQPjUk2kIAjKPQPYmekras+fRWi+b811GU9CvDfjna1L0wpMVoemcORcno4M5FZCX12zuwKPZWDkRyDUZ5l4mwXC3fBmQB+q4vyXaj5HUNoHGmAcmot1j0TXZr/+fwSCOXA9E4=;25:3jZhxUgucGynbTfbXjeyNzdPMWNMvHCLgIfX9PLbFHTqzRKWGNyveYoFk5dHIJk/SzjcR8Bu9l6aRXwZZlvwCkRTy4IOETgNGZ8Ce5bFZXTPYolNakQ9jR9Noj1E67irUdncUvECg1L3aGnWSrHDzAsal9bydXo9S2ua2rtMziNy+oWVb0yNMm9UDnF44vWrqTbb5U95c/0fnY8Ygd0QsCBKwV8eldA5svIXfUwD2GD3LFW7K97/YGZ2y1tIJSdj/qZjgDu36S780gM1XuH2eChJKPzWdi+JryZd9WAYUcCLl/d483q19B65r8hExkkJ+opCMnqboAEmg0pdKL8k9A== X-MS-TrafficTypeDiagnostic: SN6PR07MB4397: X-Microsoft-Exchange-Diagnostics: 1;SN6PR07MB4397;31:WssBdwqZjfp3yv1zyhSLxd7lgs1RNP1P91Fd0zjuddwpizFRAQ1eg5ul+f5DAFNMdn2WiX1meWUyo25RDl6/J+10IrScEKyAcxrhNWHdXVeYr4sDqgSLjaSBpMHF8i3dqbw/R0C4ITZqJa1+sx1vjX+Hi2m4zgCULoNy4CRN+PR0Hfxs3Rn99E3QCX/UJ50EU5pzZGZxADR0eLqiGMCabmsK61keNEz2yd4xGjuuJIY=;20:5w/p9UhNO3uct/zUZl8Sjk/AaR+YIdInVR1K8a7Ijw0tr9g92WAYUjQes1EEwCXaWkOKQjk3Vv1uszYa/Z+rMz+cfXkvdvjI7MmTeOcO50g2LTfAO7wMcd5WNQQWWgfn7KCrOIdY6FGBvAZSEVFQEcwrylDI1dJXCvn+6D7hOkRVPDo+fS/NO2pK0Y8UB2UY3ldUtU8LASVI7SN9Mrx9KiZMOOZvisdYTVhTUFv0jLgBFYXqq5RdVCRCImp8pjyKYnNyptsCLaBYQrISYIOxBaTxKSPLtjPp2q/HstN0my+Sx014/Y8w0ZZeOTsrakmaTCeOOoauw8OJi+ZWkqyg5OPjwoW04ljkH2XIFyj0pAXJWIPcSgFYIRpPzyTQ7Z6U5S6UWzYErVUubX0B/MynsXV4QHTw5Jaal24h1mkFIhvHnF8VoJ05xC55lPXT8P0CSMt6xrx3fNqRMptOcqZFwscRAQ4MHaBjcj/z1GjKG6Yn1PlBBrLF7/j99WeKk2bb X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(9452136761055); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(93006095)(93004095)(3231355)(944501410)(52105095)(149066)(150057)(6041310)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(201708071742011)(7699051);SRVR:SN6PR07MB4397;BCL:0;PCL:0;RULEID:;SRVR:SN6PR07MB4397; X-Microsoft-Exchange-Diagnostics: 1;SN6PR07MB4397;4:KEp2AaCYTD8mwAnsft1tYfVC+lEUqrup+4CdUcB4IjEoVeI7dWEWZhMs0V3EX/i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kNIRenyNLP6xvsNndoHon53A8d/5xaJlhUZ9JwvVXFyentd+f70BCkOJxQpm7d/NmfULokJKc6k/U9oCwNx8o57W5lvO286vGp1gt9u2R/ZYbdx/fwXMYxKFzRzETZ2TQcgnwMAdnwwYdglJUq8YLZIKp6X6gAScR/s5t2Myk7N5qYnvqAnUzsSjHH0oq2R3qGspbI47DD5KpYrnSr919raXXoHGx8g==;5:QhaYLyJfXddhBPyy4Rfr1XDHZj8Q/kr4XnIWdd6KX/RPfUUVt/KlLplio2KE0A4Zfxnr3pAiSNNh0jtN1VdjIdWyLGrzAnZ+iqZBXwMGJmfZfB0KmWbU7YiQv/ayiioQrpA971WU19umcL0/glOM0i5lMbryqTt3S7eVcu83Gt4=;7:aUiMDi59HjE89gUN02a19e0lZoQfNgnZnD1sYlLu+4uzfR3h/KSrJZGu2TYiHvZ93QxGExFJYsvM28riSdbCAA5hAFhzf54n/31OtwHdraHoatN0rhnXQDMMEA+BghKW25w8B0KynnyhDFMOXOft2plGZLin1+RZA+B4+6zJXNn0qw8l0NGpVFE6kc4ZxxB/dhp6BwVID7MixbLOByJbwYB4GRGZlQZdpK6lh5F331jptSsl/PlK0ofTlnz7ap8r SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Sep 2018 05:05:41.5071 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8aa93922-c588-4be3-d278-08d62436dfa0 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: SN6PR07MB4397 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 fixes issue during switch command query where driver was freeing SRB resources multiple times Following stack trace will be seen [ 853.436234] BUG: unable to handle kernel NULL pointer dereference at 0000000000000001 [ 853.436348] IP: [] kmem_cache_alloc+0x74/0x1e0 [ 853.436476] PGD 0 [ 853.436601] Oops: 0000 [#1] SMP [ 853.454700] [] ? mod_timer+0x14a/0x220 [ 853.455543] [] mempool_alloc_slab+0x15/0x20 [ 853.456395] [] mempool_alloc+0x69/0x170 [ 853.457257] [] ? internal_add_timer+0x32/0x70 [ 853.458136] [] qla2xxx_queuecommand+0x29b/0x3f0 [qla2xxx] [ 853.459024] [] scsi_dispatch_cmd+0xaa/0x230 [ 853.459923] [] scsi_request_fn+0x4df/0x680 [ 853.460829] [] ? __switch_to+0xd7/0x510 [ 853.461747] [] __blk_run_queue+0x33/0x40 [ 853.462670] [] blk_delay_work+0x25/0x40 [ 853.463603] [] process_one_work+0x17a/0x440 [ 853.464546] [] worker_thread+0x126/0x3c0 [ 853.465501] [] ? manage_workers.isra.24+0x2a0/0x2a0 [ 853.466447] [] kthread+0xcf/0xe0 [ 853.467379] [] ? insert_kthread_work+0x40/0x40 [ 853.470172] Code: db e2 7e 49 8b 50 08 4d 8b 20 49 8b 40 10 4d 85 e4 0f 84 20 01 00 00 48 85 c0 0f 84 17 01 00 00 49 63 46 20 48 8d 4a 01 4d 8b 06 <49> 8b 1c 04 4c 89 e0 65 49 0f c7 08 0f 94 c0 84 c0 74 ba 49 63 [ 853.472072] RIP [] kmem_cache_alloc+0x74/0x1e0 [ 853.472971] RSP Fixes: 726b85487067 ("qla2xxx: Add framework for async fabric discovery") Cc: Signed-off-by: Giridhar Malavali Signed-off-by: Himanshu Madhani --- drivers/scsi/qla2xxx/qla_gs.c | 3 +++ drivers/scsi/qla2xxx/qla_init.c | 15 +++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_gs.c b/drivers/scsi/qla2xxx/qla_gs.c index e22c038e47a8..de3f2a097451 100644 --- a/drivers/scsi/qla2xxx/qla_gs.c +++ b/drivers/scsi/qla2xxx/qla_gs.c @@ -3261,6 +3261,9 @@ static void qla24xx_async_gpsc_sp_done(void *s, int res) "Async done-%s res %x, WWPN %8phC \n", sp->name, res, fcport->port_name); + if (res == QLA_FUNCTION_TIMEOUT) + return; + if (res == (DID_ERROR << 16)) { /* entry status error */ goto done; diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index dbeb85f161e3..afb6cd7b6800 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c @@ -52,12 +52,14 @@ qla2x00_sp_timeout(struct timer_list *t) struct srb_iocb *iocb; struct req_que *req; unsigned long flags; + struct qla_hw_data *ha = sp->vha->hw; - spin_lock_irqsave(sp->qpair->qp_lock_ptr, flags); + WARN_ON(irqs_disabled()); + spin_lock_irqsave(&ha->hardware_lock, flags); req = sp->qpair->req; req->outstanding_cmds[sp->handle] = NULL; iocb = &sp->u.iocb_cmd; - spin_unlock_irqrestore(sp->qpair->qp_lock_ptr, flags); + spin_unlock_irqrestore(&ha->hardware_lock, flags); iocb->timeout(sp); } @@ -787,6 +789,9 @@ qla24xx_async_gnl_sp_done(void *s, int res) sp->name, res, sp->u.iocb_cmd.u.mbx.in_mb[1], sp->u.iocb_cmd.u.mbx.in_mb[2]); + if (res == QLA_FUNCTION_TIMEOUT) + return; + memset(&ea, 0, sizeof(ea)); ea.sp = sp; ea.rc = res; @@ -972,6 +977,12 @@ void qla24xx_async_gpdb_sp_done(void *s, int res) fcport->flags &= ~(FCF_ASYNC_SENT | FCF_ASYNC_ACTIVE); + if (res == QLA_FUNCTION_TIMEOUT) { + dma_pool_free(sp->vha->hw->s_dma_pool, sp->u.iocb_cmd.u.mbx.in, + sp->u.iocb_cmd.u.mbx.in_dma); + return; + } + memset(&ea, 0, sizeof(ea)); ea.event = FCME_GPDB_DONE; ea.fcport = fcport;