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@xxxxxxxxxx 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 <yanjun.zhu@xxxxxxxxxx>
---
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
>From 9d8e7c568485b1b10ccdfa02305c6fa284f42d8f Mon Sep 17 00:00:00 2001
From: Dag Moxnes <dag.moxnes@xxxxxxxxxx>
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 <dag.moxnes@xxxxxxxxxx>
---
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