Received: by 10.192.165.148 with SMTP id m20csp567048imm; Wed, 25 Apr 2018 04:23:44 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrqzsiy/aKqGAD59dGNWiGVni0mrh6as//aS2CJz1dc1UUHBLYFrQ+MVuH21s8wptqsdb8m X-Received: by 10.98.215.81 with SMTP id v17mr6115262pfl.39.1524655424569; Wed, 25 Apr 2018 04:23:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524655424; cv=none; d=google.com; s=arc-20160816; b=mlXMB+VWg9dIHEAt4kXTwsXTpyEeSyz1KuGriYEXv36ZawNthhZofYqOGL7uL0hSik bzWglRoyKgP3oya7zhb9CNOp3IOWV9K2mixj5pB+eat5vsEjD8Qsj4oh0snymMSDEqw0 ZL6dw1d6Fn7fHlUReOu9d/JMiRxz977v8IXjkC2I+hvSnAWIZagJN9QGfqxLXqGAVx5P oJnhAxeUfRN5CGWy/w09QTHlmY54d8wL+3IPhdPiEjkt9mPS9MJho6suceO4Q4KiDRCC 5i8i2KbMq4WJAyHhC4u6PjJIEJqU43RBk6+/1pvRTKBbLedg1j43A3wrC/oowIED0i48 Fl/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:to:from :dkim-signature:arc-authentication-results; bh=HfE7S1HXb93A6fe/q9DyraJR+8+ra8zhUfRX1dx0Pqs=; b=F1A4eQVDNPYqsa+96G13D1nm1V9rw0B7Dw2vsXEQjFLS2WA9dVaHEBc2kUma7Ebs1Z ZQpA8PxhCNzOxnM+CAb7ydxYbFzxiVOsqlQbFO7ay89YakwDRKqXnw4WtmPI5WkA8j9v /YTVgGXqi/3YhleI2g8H6hhzBqg1eRBMZ1mu2P7l3/5HN48oa6SfYHpqBL6lGHPuHlx+ 88JwKQifzNMCi21KrUaHa/RQuX0qbYAhRhUMuOXJXXTJqH5AerPyKJdG9dhfiIG4Fuv1 hxa8mqMqyHXwcKXRPJDQBhqH3cTbt5XA6qUj1fPHtKpm5xOj/NJbKeuFkjlU3AdzCbAy avJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=T7d4PjES; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n26si13884428pgc.677.2018.04.25.04.23.30; Wed, 25 Apr 2018 04:23:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=T7d4PjES; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752419AbeDYLWb (ORCPT + 99 others); Wed, 25 Apr 2018 07:22:31 -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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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; -- 1.7.1