From patchwork Wed Dec 20 17:49:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan Tan X-Patchwork-Id: 10126151 X-Patchwork-Delegate: jgg@ziepe.ca 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 8FEEF6019C for ; Wed, 20 Dec 2017 17:49:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7E055289FD for ; Wed, 20 Dec 2017 17:49:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7307228A84; Wed, 20 Dec 2017 17:49: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.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 ED6B0289FD for ; Wed, 20 Dec 2017 17:49:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755873AbdLTRtN (ORCPT ); Wed, 20 Dec 2017 12:49:13 -0500 Received: from mail-sn1nam02on0086.outbound.protection.outlook.com ([104.47.36.86]:54028 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755855AbdLTRtM (ORCPT ); Wed, 20 Dec 2017 12:49:12 -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=YXFpSZGln8Cwq4eTeXI7bmAooNV2AB7XZZK+rgxW1Js=; b=mlLkIuegmZqgZFoVntBSAnyni5DQxjUEL7mn6XQj4wRKsSflNesNbgUUPJKgfCgEkagTPmDMV8xUlmu3saYMc+H3+kbyNFk34axsC0z1FdhiXX92I3t2el69HNJujv8OFD0w/KjQ5n6OGGi/Bku/OlW/jVdxSxODVsu9VSAcXv4= 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 CY1PR05MB2778.namprd05.prod.outlook.com (10.167.18.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.282.3; Wed, 20 Dec 2017 17:49:10 +0000 Date: Wed, 20 Dec 2017 09:49:03 -0800 From: Bryan Tan To: linux-rdma@vger.kernel.org Subject: [PATCH v2 for-rc 1/4] RDMA/vmw_pvrdma: Call ib_umem_release on destroy QP path Message-ID: <20171220174859.GA19620@bryantan-devbox.prom.eng.vmware.com.prom.eng.vmware.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20171220174748.GA18149@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: MWHPR18CA0047.namprd18.prod.outlook.com (10.175.9.161) To CY1PR05MB2778.namprd05.prod.outlook.com (10.167.18.24) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6e5849a2-bb06-46a9-8fdb-08d547d1f9e0 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060); SRVR:CY1PR05MB2778; X-Microsoft-Exchange-Diagnostics: 1; CY1PR05MB2778; 3:YK8r56wvp3ZlBk5ljfzqs4edCHBJ2T03omv35qomPRq+C9mk7PsBTNWWciSO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5Z5VzTX9mWbPqdLxh+TwS0Yod+f3e4lGaRMLD+ln6VcGTIflX1WaV0faNW8cy2RrATXMhV7nf167te21/3uNT/djwwiGkmPxrEuGc5Msv9jNOXeA/YfcaN38Cvly2jjma2/R/QiARve+2nzS/OpFHygfICWc0Es3Dm/wTQ9lCfCXSsa5yzEaAG8PKSIRkopub5M4e3cYwWP2tksNIdHtFAyExw/D+8h2gR1SkAOZzR42GMjYldInVXNghYCO7OVAm4TDzh94dvSM4i0iTyndxDuKrhqfcxiAUjbD5Rb0CiMgFIS+sSG; 4:xXRzLgc7t5bEmfeRmwcd+e9FzodogqJ+9jvfFWQLtbv7Vi++58qJYUvlqP/7dA21tJPWsIxnnxxP7VEUiY6DVZ+Br5I9fty21zm71TM8OrU37uUuufAaq6yAZAsw+1V/yNgr/fn1ZDtn3tSOZ/KD8gQwxH5vIZsecZY8YrG85WNl39O1iTdH3D47NgJ+HwrAWBvsLjSF+Kpbvx5B54+O3vCHznb7GCeBtyiqvrnvpGnFq1DEXM9AXF/fRFTTcRbs//BM1L5ibyQIgGknZXtrKFtR02XqfTGeFCzcpP2v0Z4Xd3UjHclDorSRcMBn1BZi X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(61668805478150); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(5005006)(8121501046)(10201501046)(3002001)(3231023)(93006095)(93001095)(6041268)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:CY1PR05MB2778; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:CY1PR05MB2778; X-Forefront-PRVS: 0527DFA348 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39380400002)(366004)(39860400002)(346002)(376002)(396003)(199004)(189003)(6916009)(6116002)(386003)(1076002)(7736002)(7696005)(5660300001)(52116002)(2906002)(23726003)(50466002)(81166006)(3846002)(55016002)(478600001)(53936002)(97736004)(2950100002)(81156014)(83506002)(6666003)(33656002)(8676002)(86362001)(2361001)(16586007)(16526018)(66066001)(316002)(58126008)(68736007)(25786009)(2351001)(305945005)(105586002)(106356001)(8936002)(47776003)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR05MB2778; H:bryantan-devbox.prom.eng.vmware.com.prom.eng.vmware.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX: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; CY1PR05MB2778; 23:uyG9Fj6ukINFI70BoBTrZ8+wTs10k/LhTpm4ySSjw?= =?us-ascii?Q?F2uj9SghhE6J5haeR1/LEW28ut930Hof2Ia1V+zXnmSdGWn251bxpL4UO776?= =?us-ascii?Q?P81gT0TUF6+/xjG78/za/4e5qk5UqyavGa7u0nJHMSfwyZ6VFCb/+ltM1/en?= =?us-ascii?Q?u219UXPqYHB51WCYplWZsBDOnV7/rBbalLBj0HziMBFf9muCV5qLrVOwpuqt?= =?us-ascii?Q?1yCyO3FZ/xAgsgBko0f3Y4nNhQyAVvcew8TPFHGB8wcNGwyekxLpVRg2y47l?= =?us-ascii?Q?hH8Q+9IeANeVypa33wsfqqlbP+PkkNM5po4AwOOPRKURtuOLz/1lWDP0zwam?= =?us-ascii?Q?fezJYz8UOwyDPdERCvJTdFfdPpaBxEFRM5//7URvluGSluseLYZZjRnPMt1W?= =?us-ascii?Q?t380O000s/pTpnuxBopwJcyHAWTpv7wU1LF7f+v05SyrDjmDa0PwFGQmpt4m?= =?us-ascii?Q?GcIcy4uDTz+w5TRd5zhueaIuq4BXtYTLMjX0Nx5SqwxRrMbDXcQ8cqOqLuna?= =?us-ascii?Q?etsLG2JLngiGSSISCMAK174pIWjptuJPv7MFpxhQPDIbC1FNJav+SDJwTkr4?= =?us-ascii?Q?mU1JFqyeX/2FRf1PnFLeqDSfojQ6MueV6o+3Rcje+Q5GRF6JZUqSolO9LVn9?= =?us-ascii?Q?dz/kTDvUdQTqkJNZ5/iti1fR/1fGwDFYvi/vGFnUkuEbEl7T9jWTur98sKN9?= =?us-ascii?Q?S5Zqiq4sxtrbyQfqceC72z6CLcdFAf1tXmH2l2syB0LSybZMsyO0tyVx51i6?= =?us-ascii?Q?nJ3g+gewJ4G+iFr4wd8HgIM2oxxNSHvkiTExQkuMdUSTMgFfi6fZdVrvodcI?= =?us-ascii?Q?JThcKpRl0KkT+R63jhcY9MOSJnkR7gTXr/bNCpyarMTnhDm0lEPsQKVzRtSa?= =?us-ascii?Q?ygZPldGA+nzSuTJTNyeYWv31Xi+XoI6Bjp9mSriJ3vZj71SJnousoheQTSyp?= =?us-ascii?Q?fXxtplpW8qIIXfERgNbSnF6gc4PPc1ryeIYjw6CJ621Xd30mf+qmIAHIoVkq?= =?us-ascii?Q?F5NhElIzwNUj1PixZkt2AVibShPOMAJKZZR43ehoLhegj9M6uXe6pzt7M1+o?= =?us-ascii?Q?9283r0DHvJE0/4eXV1haLOhYAL8/i5PzYZ+M51hiLcY6dG1vg=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR05MB2778; 6:duaA+pm6QqWdRNf6oIo4u44MaHMdX8vGbgEoZLMowHg0R3BMi9WZbAUzQy0dbue10krRrxxcaFFNJ+WrpyfzssieWoENf8oeYKwfveQ3XXD1O25h6yMe1l023OD1VtKldr9veQje8rPTe3UP9cphijtKbnbkmsxmYz+ClCRAPNt+Px55M8vDEDZeHdfRy5cI9x/57rz8U0GcGkziNtG8GyaTeOi7nAD3XUXvO1Pz4Es0btNbhvRjG7e4OCQmD498DUnonKZ5pA2LUicjNVkdljk2sQqNS766hpYNc4p8ChEbkAjtMDtCc/OO+DH3euCxzo5c91Id6xVIi7qy2VyW5uZf033omCJlNCueFfxWxpY=; 5:j2nWa4uomcwWUtTdGrpmKGnC//LoYfs45W1JrI0RzWCExdJVCtzIKLMyRoyFRAYGt3EDBnELc2KgWuVRQmSB/tUZlZelYrLu4LZKbPTQOTTHMd4jhykDjXj8Mqx3xOxiJomlP9uviJMtaJ7aAZt68GF9eOqSoWPg1F3YjzRAsvs=; 24:mVCcmLsOD6OLnINA5hWFCXhQJPv6SIwa96eX60szErm5Y2hutBRVUKA5N25BJBTkFWw1hf390A+OclotA3MPK76kNaFm66wQ+AmzIE7fAw8=; 7:YQCfyQVis0Hitk+MYlyeyt6DMWC87Cq4UqbeEQKffqwI9VCVLaqqJ0oj5L+DTiol2R4W9OkyjRlpRQW5vbuLKHKgdx43w58xvLANmfPOrHcnuso/x8+VmEdFOqCm/VUDKEwu4pMuifCVVz2ihcLggxmnHZkM1CraUzJXhZsf9/wxVKgtfr7d6jArU/U36qfyyijwC2Aor0rQnyRNWED2q/79dWQXPUq4AVYat8orvbHAu3CIm8cUDILb6ZDThca3 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR05MB2778; 20:yBqHAfkIexCTDxcKb4FXyA+pFq7/0SFsgBMhcAiChI5ilnOtQEhvEEiLXNLVBj7uDyXPEyGCd5VK++VT1/u34jVZAaiRiKFaHln+mJjUQmbUzwfj0mDl/bByOtNJNUyMsFB+6EnznX3XoiA/eSvI0Iy8fkiUgOBtM78kstt2eRc= X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Dec 2017 17:49:10.6742 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6e5849a2-bb06-46a9-8fdb-08d547d1f9e0 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR05MB2778 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 --- 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 10420a1..dceebc6 100644 --- a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c +++ b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c @@ -431,6 +431,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);