From patchwork Tue Apr 24 11:25:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dag Moxnes X-Patchwork-Id: 10359275 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 BF23D602D6 for ; Tue, 24 Apr 2018 11:25:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ABFCB28D7D for ; Tue, 24 Apr 2018 11:25:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9E6A128D80; Tue, 24 Apr 2018 11:25:19 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID,T_TVD_MIME_EPI 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 E486B28D7F for ; Tue, 24 Apr 2018 11:25:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752892AbeDXLZQ (ORCPT ); Tue, 24 Apr 2018 07:25:16 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:39340 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751245AbeDXLZP (ORCPT ); Tue, 24 Apr 2018 07:25:15 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w3OBL6jm097062; Tue, 24 Apr 2018 11:25:12 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type; s=corp-2017-10-26; bh=O8RV/6TLNn8a95VG0s6YnzJuVpnO1psWCwAM5KxSlpw=; b=blRJEEYz+/6a8rK9DxZzz7hVsP7kISs3vnAtT/llvVKHWv0PiMWocUHVdibbOMjLDvZi 7BvE/4QNpRX5SYH//U4t3pzwuQ7QgsjP2GfDd3fc6Ijqzs/3XOTtR/R3FV2S1TXLU9ps uKOeBC2NVoOijFNskaLnaByn+HLQFFy9iRxsJgJRp/b5U17X2F26uFiGoOvq5J/EVDt/ MAbWBIswTuteJIrxfZNKos8aeSPZPW7cKGmCH7cmuql91Zh9hDUae9pNoG37vFlUiMoR l8ue5hDD1ZUdsZ9wvLswRfqaJWAl+V8rlEgOSR7osHQZK1oWgY7vl9QuNpqAFLgHGQ0+ Ew== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp2120.oracle.com with ESMTP id 2hfwy9hfva-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 24 Apr 2018 11:25:12 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w3OBPBKB018950 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 24 Apr 2018 11:25:11 GMT Received: from abhmp0005.oracle.com (abhmp0005.oracle.com [141.146.116.11]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w3OBPBW8013174; Tue, 24 Apr 2018 11:25:11 GMT Received: from [10.0.2.15] (/10.172.157.160) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 24 Apr 2018 04:25:10 -0700 Subject: Re: [PATCH 1/1] Revert "rds: ib: add error handle" To: =?UTF-8?Q?H=c3=a5kon_Bugge?= , Santosh Shilimkar Cc: Zhu Yanjun , OFED mailing list , rds-devel@oss.oracle.com, davem@davemloft.net, netdev@vger.kernel.org References: <1524533941-4072-1-git-send-email-yanjun.zhu@oracle.com> <4e17b3f0-94b4-6038-419d-68657027f331@oracle.com> <66130D36-2987-416A-AF31-2BB9001E0036@oracle.com> From: Dag Moxnes Message-ID: <373de57c-4cab-0d04-0021-57b566cefe0d@oracle.com> Date: Tue, 24 Apr 2018 13:25:08 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <66130D36-2987-416A-AF31-2BB9001E0036@oracle.com> Content-Language: en-US X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8872 signatures=668698 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=2 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=891 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1804240113 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 I was going to suggest the following correction: If all agree that this is the correct way of doing it, I can go ahead and an post it. Regards, -Dag On 04/24/2018 01:10 PM, Håkon Bugge wrote: > >> On 24 Apr 2018, at 05:27, santosh.shilimkar@oracle.com wrote: >> >> On 4/23/18 6:39 PM, Zhu Yanjun wrote: >>> This reverts commit 3b12f73a5c2977153f28a224392fd4729b50d1dc. >>> After long time discussion and investigations, it seems that there >>> is no mem leak. So this patch is reverted. >>> Signed-off-by: Zhu Yanjun >>> --- >> Well your fix was not for any leaks but just proper labels for >> graceful exits. I don't know which long time discussion >> you are referring but there is no need to revert this change >> unless you see any issue with your change. > As spotted by Dax Moxnes, the patch misses to call rds_ib_dev_put() when exiting normally, only on err exit. > > > Thxs, Håkon > >> Regards, >> Santosh >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html From 9d8e7c568485b1b10ccdfa02305c6fa284f42d8f Mon Sep 17 00:00:00 2001 From: Dag Moxnes Date: Tue, 24 Apr 2018 13:14:48 +0200 Subject: [PATCH] rds: ib: Fix missing call to rds_ib_dev_put in rds_ib_setup_qp The function rds_ib_setup_qp is calling rds_ib_get_client_data and should correspondingly call rds_ib_dev_put. This call was lost in the non-error path with the introduction of error handling done in commit 3b12f73a5c2977153f28a224392fd4729b50d1dc. Signed-off-by: Dag Moxnes --- net/rds/ib_cm.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/net/rds/ib_cm.c b/net/rds/ib_cm.c index eea1d86..3193249 100644 --- a/net/rds/ib_cm.c +++ b/net/rds/ib_cm.c @@ -547,7 +547,7 @@ static int rds_ib_setup_qp(struct rds_connection *conn) rdsdebug("conn %p pd %p cq %p %p\n", conn, ic->i_pd, ic->i_send_cq, ic->i_recv_cq); - return ret; + goto out: sends_out: vfree(ic->i_sends); @@ -572,6 +572,7 @@ static int rds_ib_setup_qp(struct rds_connection *conn) ic->i_send_cq = NULL; rds_ibdev_out: rds_ib_remove_conn(rds_ibdev, conn); +out: rds_ib_dev_put(rds_ibdev); return ret; -- 1.7.1