From patchwork Wed Apr 25 11:22:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dag Moxnes X-Patchwork-Id: 10362681 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 5E8CB6032C for ; Wed, 25 Apr 2018 11:22:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4FA7A28F98 for ; Wed, 25 Apr 2018 11:22:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 43DA728FA0; Wed, 25 Apr 2018 11:22:33 +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, UNPARSEABLE_RELAY 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 B485328F98 for ; Wed, 25 Apr 2018 11:22:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752630AbeDYLW3 (ORCPT ); Wed, 25 Apr 2018 07:22:29 -0400 Received: from aserp2130.oracle.com ([141.146.126.79]:34122 "EHLO aserp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751577AbeDYLWZ (ORCPT ); Wed, 25 Apr 2018 07:22:25 -0400 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w3PBLWl4027941; Wed, 25 Apr 2018 11:22:21 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id; s=corp-2017-10-26; bh=HfE7S1HXb93A6fe/q9DyraJR+8+ra8zhUfRX1dx0Pqs=; b=T7d4PjESJ3/V+rAgp3J3ADjV280uZSN6alcH827cmXZ8pROrqOm5A2OIZol6fS4hP1qv oyMivNPKy8oyl8hRts6OpxQtY/CGzrlq2RTDfnNcAZCDOp0xhF3wxKVSfSxZu80FAHMT tTmLqx6phjB+pdF+igAxBxnYGnGvXNeFQ1wb5yOsEvVccRuU6DEwcuMELA6UhWuix4We UgmnofF3TxOi2Sfy1YOilfhPJF4/4GkEgOqHXbD06oe5GAYdbGzZJzdYjQPAwqXIGyjr KkBzQiUjxDQ42NyDqJZFplA5hf5BnYVH5n323TlYYyImTyObp7BjnLi8wXNhdH2zSzl+ Pw== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp2130.oracle.com with ESMTP id 2hftty69yk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 25 Apr 2018 11:22:21 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w3PBMKCe028371 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 25 Apr 2018 11:22:21 GMT Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w3PBMJ64015333; Wed, 25 Apr 2018 11:22:20 GMT Received: from dm-oel.no.oracle.com (/10.172.157.160) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 25 Apr 2018 04:22:19 -0700 From: Dag Moxnes To: Santosh Shilimkar , "David S. Miller" , netdev@vger.kernel.org, linux-rdma@vger.kernel.org, rds-devel@oss.oracle.com, linux-kernel@vger.kernel.org Subject: [PATCH] rds: ib: Fix missing call to rds_ib_dev_put in rds_ib_setup_qp Date: Wed, 25 Apr 2018 13:22:01 +0200 Message-Id: <1524655321-8379-1-git-send-email-dag.moxnes@oracle.com> X-Mailer: git-send-email 1.7.1 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8873 signatures=668698 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=698 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1804250108 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 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 3b12f73a5c29 ("rds: ib: add error handle") Signed-off-by: Dag Moxnes Reviewed-by: HÃ¥kon Bugge Acked-by: Santosh Shilimkar --- 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..13b38ad 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;