Re: [PATCH] IB/cma: Fix net_dev reference leak with failed requests

2015-09-03 Thread Doug Ledford
On 08/27/2015 08:55 AM, Haggai Eran wrote:
> When no matching listening ID is found for a given request, the net_dev
> that was used to find the request isn't released.
> 
> Fixes: 20c36836ecad ("IB/cma: Use found net_dev for passive connections")
> Signed-off-by: Haggai Eran 

Applied, thanks!

> ---
>  drivers/infiniband/core/cma.c | 4 
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
> index 9b306d7b5c27..b1ab13f3e182 100644
> --- a/drivers/infiniband/core/cma.c
> +++ b/drivers/infiniband/core/cma.c
> @@ -1302,6 +1302,10 @@ static struct rdma_id_private 
> *cma_id_from_event(struct ib_cm_id *cm_id,
>   bind_list = cma_ps_find(rdma_ps_from_service_id(req.service_id),
>   cma_port_from_service_id(req.service_id));
>   id_priv = cma_find_listener(bind_list, cm_id, ib_event, , *net_dev);
> + if (IS_ERR(id_priv)) {
> + dev_put(*net_dev);
> + *net_dev = NULL;
> + }
>  
>   return id_priv;
>  }
> 


-- 
Doug Ledford 
  GPG KeyID: 0E572FDD




signature.asc
Description: OpenPGP digital signature


Re: [PATCH] IB/cma: Fix net_dev reference leak with failed requests

2015-08-31 Thread Doug Ledford
On 08/31/2015 11:20 AM, Weiny, Ira wrote:
>>
>> On 08/30/2015 02:12 AM, Or Gerlitz wrote:
>>> On Thu, Aug 27, 2015 at 5:55 AM, Haggai Eran 
>> wrote:
 When no matching listening ID is found for a given request, the
 net_dev that was used to find the request isn't released.

 Fixes: 20c36836ecad ("IB/cma: Use found net_dev for passive
 connections")
>>>
>>> same here, Doug,
>>
>> Same as the last email, I have the commit ID now, and I fixed up the commit
>> message.
>>
> 
> Doug I'm working on the clean up Hal suggested to the ib_mad.h file which was 
> updated in your to-be-rebased-4.3 branch via this patch.
> 
> Fixes: abde0260e47b ("IB/core: Add header definitions")
> 
> It looks like this is the patch destined for 4.3 on this branch k.o/for-4.3?
> 
> Fixes: d4ab347005fb ("IB/core: Add core header changes needed for OPA")

Correct.  I squashed the first two patches (which both touched core
files) down to just one.

> I personally did not mind the rebasing except for this issue.
> 
> Let me know which branch I should base these changes off of.

Base if off of the k.o/for-4.3.  That's where it will go.  I'll just end
up applying this to the top of the stack.


-- 
Doug Ledford 
  GPG KeyID: 0E572FDD




signature.asc
Description: OpenPGP digital signature


Re: [PATCH] IB/cma: Fix net_dev reference leak with failed requests

2015-08-30 Thread Or Gerlitz
On Thu, Aug 27, 2015 at 5:55 AM, Haggai Eran hagg...@mellanox.com wrote:
 When no matching listening ID is found for a given request, the net_dev
 that was used to find the request isn't released.

 Fixes: 20c36836ecad (IB/cma: Use found net_dev for passive connections)

same here, Doug, if this ID isn't the one that is actually going to
show off in Linus tree, please either squash this there prior to
getting the bits upstream or hold off till we have  a proper ID

 Signed-off-by: Haggai Eran hagg...@mellanox.com
 ---
  drivers/infiniband/core/cma.c | 4 
  1 file changed, 4 insertions(+)

 diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
 index 9b306d7b5c27..b1ab13f3e182 100644
 --- a/drivers/infiniband/core/cma.c
 +++ b/drivers/infiniband/core/cma.c
 @@ -1302,6 +1302,10 @@ static struct rdma_id_private 
 *cma_id_from_event(struct ib_cm_id *cm_id,
 bind_list = cma_ps_find(rdma_ps_from_service_id(req.service_id),
 cma_port_from_service_id(req.service_id));
 id_priv = cma_find_listener(bind_list, cm_id, ib_event, req, 
 *net_dev);
 +   if (IS_ERR(id_priv)) {
 +   dev_put(*net_dev);
 +   *net_dev = NULL;
 +   }

 return id_priv;
  }
 --
 1.7.11.2

 --
 To unsubscribe from this list: send the line unsubscribe linux-rdma in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line unsubscribe linux-rdma in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] IB/cma: Fix net_dev reference leak with failed requests

2015-08-30 Thread Doug Ledford
On 08/30/2015 02:12 AM, Or Gerlitz wrote:
 On Thu, Aug 27, 2015 at 5:55 AM, Haggai Eran hagg...@mellanox.com wrote:
 When no matching listening ID is found for a given request, the net_dev
 that was used to find the request isn't released.

 Fixes: 20c36836ecad (IB/cma: Use found net_dev for passive connections)
 
 same here, Doug,

Same as the last email, I have the commit ID now, and I fixed up the
commit message.



-- 
Doug Ledford dledf...@redhat.com
  GPG KeyID: 0E572FDD




signature.asc
Description: OpenPGP digital signature


[PATCH] IB/cma: Fix net_dev reference leak with failed requests

2015-08-27 Thread Haggai Eran
When no matching listening ID is found for a given request, the net_dev
that was used to find the request isn't released.

Fixes: 20c36836ecad (IB/cma: Use found net_dev for passive connections)
Signed-off-by: Haggai Eran hagg...@mellanox.com
---
 drivers/infiniband/core/cma.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index 9b306d7b5c27..b1ab13f3e182 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -1302,6 +1302,10 @@ static struct rdma_id_private *cma_id_from_event(struct 
ib_cm_id *cm_id,
bind_list = cma_ps_find(rdma_ps_from_service_id(req.service_id),
cma_port_from_service_id(req.service_id));
id_priv = cma_find_listener(bind_list, cm_id, ib_event, req, *net_dev);
+   if (IS_ERR(id_priv)) {
+   dev_put(*net_dev);
+   *net_dev = NULL;
+   }
 
return id_priv;
 }
-- 
1.7.11.2

--
To unsubscribe from this list: send the line unsubscribe linux-rdma in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html