From patchwork Thu Dec 14 00:21:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan Tan X-Patchwork-Id: 10111253 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 02A8760327 for ; Thu, 14 Dec 2017 00:21:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E7F1E223A1 for ; Thu, 14 Dec 2017 00:21:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DC9EC26E79; Thu, 14 Dec 2017 00:21:56 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 B1367223A1 for ; Thu, 14 Dec 2017 00:21:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751477AbdLNAVy (ORCPT ); Wed, 13 Dec 2017 19:21:54 -0500 Received: from mail-co1nam03on0062.outbound.protection.outlook.com ([104.47.40.62]:45696 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751121AbdLNAVx (ORCPT ); Wed, 13 Dec 2017 19:21:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=onevmw.onmicrosoft.com; s=selector1-vmware-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=YkNo+FJ3T2dzRLawTx556xPEHEHhPVDGpPV1DGLcu1E=; b=hFpAenlu8DgiAdpLaTS7vcFZigiOm7lsanucUrZwKnGZLG2Eo41+v/CBpi+gWHJq3VKrEFJus3iRoeBlMVGLdBIospX4/sXzPsDfEehtn2IliHCNbgthnHDDCapgtZM4Lwxj2Pfq3KxL2uoApwh+4zQz0ViY1QawSY+XDsUvUV8= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=bryantan@vmware.com; Received: from bryantan-devbox.prom.eng.vmware.com.prom.eng.vmware.com (208.91.1.34) by CY1PR05MB2779.namprd05.prod.outlook.com (10.167.18.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.302.2; Thu, 14 Dec 2017 00:21:51 +0000 Date: Wed, 13 Dec 2017 16:21:33 -0800 From: Bryan Tan To: linux-rdma@vger.kernel.org Subject: [PATCH v1 for-rc 2/8] RDMA/vmw_pvrdma: Call ib_umem_release on destroy QP path Message-ID: <20171214002123.GA13402@bryantan-devbox.prom.eng.vmware.com.prom.eng.vmware.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20171214001753.GA9780@bryantan-devbox.prom.eng.vmware.com.prom.eng.vmware.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Originating-IP: [208.91.1.34] X-ClientProxiedBy: DB6PR07CA0123.eurprd07.prod.outlook.com (10.170.219.16) To CY1PR05MB2779.namprd05.prod.outlook.com (10.167.18.25) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f9df40f3-7680-4069-3cb1-08d54288ac8e X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603307); SRVR:CY1PR05MB2779; X-Microsoft-Exchange-Diagnostics: 1; CY1PR05MB2779; 3:V4HBJelNvFcMufd3fcZ88wOsAOzq5cJ47VSH2DypkcJ66K0p/qgzCvw5F0KO6ehRbvGvoXRey2Zr05kwhAd2HgyoZTZ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FlwFU5ohPeKs3S+1ajBMVO2MnQ1EaYLsJeuzrvHoyH0bQLyNahODV0mNmB2D6g1I1XZf304RQoEt4Jir74kz5ctJG+6jInRNJv+2IcXakHJUs0NfbAb+Zp3RuHQs7Rtbtt6sjLLqIPQM7am4xNn5zaas2CTInKowDnsIxr9D20Mx+5BBJ0x7kReAsKPil2quOGwLGOOm1Hds756xt6X5rYyBHfARD40oHCVgrkbtfj1/ZDY66E3AM0FddbnLfDGj5ETJjx4870OtnXmtoroV5Lp4ToXyP9; 4:F8kbSyGfjSIis0OEEce9DxOF7NdqnnogiVXfV8gbO1Kp9rxMdAb813M7UGWE8cU+RoTRliQFaENEFtFphbB6qlWQAHskCNJPS7FRf2LrUgDa7qtockQw+sSxvOwFv4j6BL3RH5ORsQE4XRCf3vDALV7JLPdlY5wcZSAgfNY3dQ+nXPln/Z5uw1lwWp7kPY5wj6AVAMQPfYVX9GTsvpdnHGKiJXTf/u2+sGJBfIDu34xMukZcwV2eDVrYBWq3G/d/flvauZZ1SY09bUBxjpF1xVtMri/VZicC3Ke5DX1B0FmksSvf47aV8Z7aVHQ1zCw4 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(61668805478150); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(5005006)(8121501046)(3002001)(10201501046)(3231023)(93006095)(93001095)(6041248)(20161123555025)(20161123560025)(20161123558100)(20161123564025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:CY1PR05MB2779; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:CY1PR05MB2779; X-Forefront-PRVS: 05214FD68E X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(346002)(396003)(366004)(376002)(39860400002)(189003)(199004)(86362001)(2906002)(53936002)(5660300001)(52116002)(7696005)(16526018)(2351001)(2361001)(478600001)(50466002)(25786009)(55016002)(2950100002)(7736002)(8936002)(6916009)(6666003)(97736004)(386003)(66066001)(83506002)(316002)(106356001)(23726003)(8676002)(33656002)(16586007)(58126008)(68736007)(105586002)(6116002)(1076002)(3846002)(47776003)(81166006)(81156014)(305945005)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR05MB2779; H:bryantan-devbox.prom.eng.vmware.com.prom.eng.vmware.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: vmware.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR05MB2779; 23:O7DfaRk+cFkduJz7M8jiatvFFHEhFQ/u40GKxPhjE?= =?us-ascii?Q?qgPV78U9qbbfh+HQzJ/NKOcM5thN/ODftTQH7o8i1JXe+Ty7AxD5LgFR80a0?= =?us-ascii?Q?ZX6Q4mJ56RAtXuBcAuSXQARcPomgA6V9q863LI4V++xTLbsCVRSxcsVET6FL?= =?us-ascii?Q?oA0aAoY90oDo9wp4MqXlRKFF/hF34ZsczLe6srLkbLygkd6NyycDOdoB23lX?= =?us-ascii?Q?haTxP6b4vIqGlWNCb4cCxsKycM0fqBsnkjzxp9xOjwKexw0VeOR2uE8yRChF?= =?us-ascii?Q?EdbiCG2wnZSy6zBLvHtTAHSbn3PxWcKnuc5jXbWy518hDpT5z6NoRHuQI/5y?= =?us-ascii?Q?V+1Ljp37rUXEbjgd5T8eG3QFczBDLE+e2MCxEW8TiK429OJCg6Y91hpj+aKe?= =?us-ascii?Q?zHE2ORCGEHk9iAsVqpiOUdrHrSd720EPlxuRGOiyh8VZKTK7dgjXysuavK08?= =?us-ascii?Q?DgDplr07ojF6pXalHd8CXtUqv1m9wmWpbIuaFhdWizQTz1dFwcwqVgRzEZsh?= =?us-ascii?Q?Xi8fyfwumvVpXCl8sNR8CPLQp/tohuSA7I9/a1w/wEpQ75a5qC0/GIUEz8l4?= =?us-ascii?Q?wxB+VIyN4m91vzuA95K/Z0ipRleUB0iDAywJcRbTeI+21ewi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IGCF9sblOz/ahwRgYFa5TdH2ZDuvApozU8eLpmGqaN1C9PP+B6E5OGGVYwkA53iLM=; 24:7GlpAVGQ0sVX6xpXI/qonW9trX9k5AHQnI/9T4gq9VGakUzyqbzy2XGsZpKNm719MPyljyOGkQrqErL5o0hhVrsrsmzs8JCHix5LNMk8DRY=; 7:kGEHkALhtRqf9IfoCa3uGW/9KI05O+ejaINycGCp74sxHYJ2xoDGI2hH9e8x28qI3eVPio6zgrT/tuTfMBFLPj3YkbDuHs6Yt5EPv/n2tP4x6j2Sj77511FHoRdIrUUH68En0E1YMVw0yFjyPVMlBKABa7WUcofeMvrQ/AghQ+j5wr5WZ6V0Hr/zmkv2knszvJkJDRRGJz5kH0a4LgJp39ZWaSw5wD4/8j9i0jQdMC9pzpiLht2oEbQkD/qfNL7Y SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR05MB2779; 20:zSXW9+NEiTDXE6/BafWDnaI9lfVGvI2X0c3OZZ1A2lXMIWf7NvIrpGsUTWEF16xnaPT4g7ESVAdF5e2RqrzoIsi8iJAeNpT24cuSBAEBSOG7mlvhbd5qs/S9Pr23A+HAIWsjq+PsluzI78t+lyPLjy+NOWSXyjSyAbMmOfdpahQ= X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Dec 2017 00:21:51.0625 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f9df40f3-7680-4069-3cb1-08d54288ac8e X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR05MB2779 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The QP cleanup did not previously call ib_umem_release. Fix this. Fixes: 29c8d9eba550 ("IB: Add vmw_pvrdma driver") Reviewed-by: Adit Ranadive Reviewed-by: Aditya Sarwade Reviewed-by: Jorgen Hansen Signed-off-by: Bryan Tan Reviewed-by: Yuval Shaia --- drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c index b932b7e..77e7e57 100644 --- a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c +++ b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c @@ -430,6 +430,13 @@ static void pvrdma_free_qp(struct pvrdma_qp *qp) atomic_dec(&qp->refcnt); wait_event(qp->wait, !atomic_read(&qp->refcnt)); + if (!qp->is_kernel) { + if (qp->rumem) + ib_umem_release(qp->rumem); + if (qp->sumem) + ib_umem_release(qp->sumem); + } + pvrdma_page_dir_cleanup(dev, &qp->pdir); kfree(qp);