From patchwork Thu Dec 15 16:15:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 9476493 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 C44F56047D for ; Thu, 15 Dec 2016 16:15:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B07D8287D1 for ; Thu, 15 Dec 2016 16:15:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A4E27287D6; Thu, 15 Dec 2016 16:15:12 +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_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, 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 2B9E9287D1 for ; Thu, 15 Dec 2016 16:15:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753550AbcLOQPL (ORCPT ); Thu, 15 Dec 2016 11:15:11 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:35079 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751902AbcLOQPK (ORCPT ); Thu, 15 Dec 2016 11:15:10 -0500 Received: by mail-wm0-f68.google.com with SMTP id a20so7475945wme.2 for ; Thu, 15 Dec 2016 08:15:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:message-id:date:user-agent:mime-version :content-transfer-encoding; bh=/FgHp6v8zcbqzVvqYBhp9QpF6nr6NORHSQsGpy3JWxk=; b=UEqp91gBTfZ6TzFMe7bGYNNk30s/N6WrPvhIbJ1FV9Yqa034RupVbr9Bu3wAajDmYx FrLMhNsYb5vOP3H61o7Nk28zOEGJa3FO5DcLmuMM8i6GZ6rXpIW7c+cLr2T5l+dEc0NK aQI779nBQCf8lTguggOEacN8ipFElQ8nhbpIdPUu+dWn0B+cTA3F10/1NoeeC0dLs79x wkSexH6NOsjqho6m6kRsTOgk3o8mpt9E5E4MpHQiv8D9mMK18Eh1KuqKUT4HzaRm28FU pUQWXXZR02jbjWWJv7Oc8np61ZAAv+yb43h8SS7y8b13tBOSDeV2oWwR+7q+J03etYA/ I2TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:message-id:date:user-agent :mime-version:content-transfer-encoding; bh=/FgHp6v8zcbqzVvqYBhp9QpF6nr6NORHSQsGpy3JWxk=; b=GEnc6W/X6POMeIfH+lBBRsUWTBXshp6bgNL0/zXXnfI89pCrRU0AQcZW4PkVGclmFU Cdz/qWhFoZDZSpNV1CN5PvqEWUDUueJh8MXP65+rmIq2v62jwFU1i+nhyG7MvgoTtQba rZNkwZXucMYj6k2gSrlm7qtJnk0WxFygKHrJKjL9v+A81a9aGeizb71fiTgRK1G6YAu7 LmTaNr6q2uYL6k15pFfl2UbA/2aEzrj2cfdEdQQ8fcJfJArNBhi+WP3xfSgZ89bWu1Vl Us2JOwFwjXYfUsscjL3Uej8UtyDYGFFt+bijhLyDVGcah56wPfOHJEkKeXpoumOu8YB+ q6Mg== X-Gm-Message-State: AIkVDXJ5oCFIj4tdpLWV4LFyQbhQjNa0wxetIecwX1PNFwC/KBA2YpkPOFbonim5uxdbrw== X-Received: by 10.28.71.14 with SMTP id u14mr2152665wma.52.1481818508952; Thu, 15 Dec 2016 08:15:08 -0800 (PST) Received: from exp-402881.sandisk.com (178-117-55-239.access.telenet.be. [178.117.55.239]) by smtp.googlemail.com with ESMTPSA id up5sm2686288wjc.12.2016.12.15.08.15.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Dec 2016 08:15:08 -0800 (PST) From: Bart Van Assche X-Google-Original-From: Bart Van Assche To: Doug Ledford Cc: Moni Shoua , Kamal Heib , Amir Vadai , Haggai Eran , "linux-rdma@vger.kernel.org" , Bart Van Assche Subject: [PATCH] IB/rxe: Fix a memory leak in rxe_qp_cleanup() Message-ID: Date: Thu, 15 Dec 2016 17:15:07 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 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 From: Bart Van Assche A socket is associated with every QP by the rxe driver but sock_release() is never called. Add a call to sock_release() in rxe_qp_cleanup(). Fixes: commit 8700e3e7c48A5 ("Add Soft RoCE driver") Signed-off-by: Bart Van Assche Cc: Moni Shoua Cc: Kamal Heib Cc: Amir Vadai Cc: Haggai Eran Cc: Reviewed-by: Moni Shoua --- drivers/infiniband/sw/rxe/rxe_qp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/infiniband/sw/rxe/rxe_qp.c b/drivers/infiniband/sw/rxe/rxe_qp.c index c3e60e4bde6e..486d576e55bc 100644 --- a/drivers/infiniband/sw/rxe/rxe_qp.c +++ b/drivers/infiniband/sw/rxe/rxe_qp.c @@ -855,4 +855,5 @@ void rxe_qp_cleanup(void *arg) free_rd_atomic_resources(qp); kernel_sock_shutdown(qp->sk, SHUT_RDWR); + sock_release(qp->sk); }