All of lore.kernel.org
 help / color / mirror / Atom feed
From: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Haggai Eran <haggaie-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] IB/cma: Fix net_dev reference leak with failed requests
Date: Thu, 3 Sep 2015 13:56:24 -0400	[thread overview]
Message-ID: <55E889C8.8080803@redhat.com> (raw)
In-Reply-To: <1440680115-9164-1-git-send-email-haggaie-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1174 bytes --]

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 <haggaie-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>

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, &req, *net_dev);
> +	if (IS_ERR(id_priv)) {
> +		dev_put(*net_dev);
> +		*net_dev = NULL;
> +	}
>  
>  	return id_priv;
>  }
> 


-- 
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
              GPG KeyID: 0E572FDD



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 884 bytes --]

      parent reply	other threads:[~2015-09-03 17:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-27 12:55 [PATCH] IB/cma: Fix net_dev reference leak with failed requests Haggai Eran
     [not found] ` <1440680115-9164-1-git-send-email-haggaie-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-08-30  6:12   ` Or Gerlitz
     [not found]     ` <CAJ3xEMhtnzHu23wnpsHex5_xt3MV=z3ERoX6T5d=RoTVdOVrpw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-08-30 22:25       ` Doug Ledford
     [not found]         ` <55E382CF.9040506-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-08-31 15:20           ` Weiny, Ira
     [not found]             ` <2807E5FD2F6FDA4886F6618EAC48510E1CB7D78D-8k97q/ur5Z2krb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-09-01  0:23               ` Doug Ledford
2015-09-03 17:56   ` Doug Ledford [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55E889C8.8080803@redhat.com \
    --to=dledford-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=haggaie-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.