LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] rds: ib: Fix missing call to rds_ib_dev_put in rds_ib_setup_qp
@ 2018-04-25 11:22 Dag Moxnes
  2018-04-25 13:48 ` Håkon Bugge
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Dag Moxnes @ 2018-04-25 11:22 UTC (permalink / raw)
  To: Santosh Shilimkar, David S. Miller, netdev, linux-rdma,
	rds-devel, linux-kernel

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 <dag.moxnes@oracle.com>
---
 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] rds: ib: Fix missing call to rds_ib_dev_put in rds_ib_setup_qp
  2018-04-25 11:22 [PATCH] rds: ib: Fix missing call to rds_ib_dev_put in rds_ib_setup_qp Dag Moxnes
@ 2018-04-25 13:48 ` Håkon Bugge
  2018-04-25 16:53 ` Santosh Shilimkar
  2018-04-25 18:34 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Håkon Bugge @ 2018-04-25 13:48 UTC (permalink / raw)
  To: Dag Moxnes
  Cc: Santosh Shilimkar, David S. Miller, netdev, OFED mailing list,
	rds-devel, linux-kernel



> On 25 Apr 2018, at 13:22, Dag Moxnes <dag.moxnes@oracle.com> wrote:
> 
> 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 <dag.moxnes@oracle.com>

Reviewed-by: Håkon Bugge <haakon.bugge@oracle.com>


Thxs, Håkon

> ---
> 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
> 
> --
> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] rds: ib: Fix missing call to rds_ib_dev_put in rds_ib_setup_qp
  2018-04-25 11:22 [PATCH] rds: ib: Fix missing call to rds_ib_dev_put in rds_ib_setup_qp Dag Moxnes
  2018-04-25 13:48 ` Håkon Bugge
@ 2018-04-25 16:53 ` Santosh Shilimkar
  2018-04-25 18:34 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Santosh Shilimkar @ 2018-04-25 16:53 UTC (permalink / raw)
  To: Dag Moxnes, David S. Miller, netdev, linux-rdma, rds-devel, linux-kernel

On 4/25/2018 4:22 AM, Dag Moxnes wrote:
> 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 <dag.moxnes@oracle.com>
> ---
Thanks Dag for following it up.

Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] rds: ib: Fix missing call to rds_ib_dev_put in rds_ib_setup_qp
  2018-04-25 11:22 [PATCH] rds: ib: Fix missing call to rds_ib_dev_put in rds_ib_setup_qp Dag Moxnes
  2018-04-25 13:48 ` Håkon Bugge
  2018-04-25 16:53 ` Santosh Shilimkar
@ 2018-04-25 18:34 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2018-04-25 18:34 UTC (permalink / raw)
  To: dag.moxnes; +Cc: santosh.shilimkar, netdev, linux-rdma, rds-devel, linux-kernel

From: Dag Moxnes <dag.moxnes@oracle.com>
Date: Wed, 25 Apr 2018 13:22:01 +0200

> 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 <dag.moxnes@oracle.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-04-25 18:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-25 11:22 [PATCH] rds: ib: Fix missing call to rds_ib_dev_put in rds_ib_setup_qp Dag Moxnes
2018-04-25 13:48 ` Håkon Bugge
2018-04-25 16:53 ` Santosh Shilimkar
2018-04-25 18:34 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).