linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Mark Zhang <markzhang@nvidia.com>
Cc: Tao Liu <thomas.liu@ucloud.cn>,
	dledford@redhat.com, leon@kernel.org, haakon.bugge@oracle.com,
	shayd@nvidia.com, avihaih@nvidia.com, linux-rdma@vger.kernel.org,
	linux-kernel@vger.kernel.org, thomas.liu@ucloud.com
Subject: Re: [PATCH] RDMA/cma: Fix listener leak in rdma_cma_listen_on_all() failure
Date: Wed, 15 Sep 2021 10:18:45 -0300	[thread overview]
Message-ID: <20210915131845.GK4065468@nvidia.com> (raw)
In-Reply-To: <4b711688-9a82-03f1-844c-cf1557892679@nvidia.com>

On Wed, Sep 15, 2021 at 02:34:19PM +0800, Mark Zhang wrote:
> > -       case RDMA_CM_LISTEN:
> > -               if (cma_any_addr(cma_src_addr(id_priv)) && !id_priv->cma_dev)
> > -                       cma_cancel_listens(id_priv);
> > -               break;
> 
> If this case is removed, is this code path still good?
> 
> cma_add_one/cma_remove_one
>   cma_process_remove
>     cma_send_device_removal_put
>       cma_cancel_operation

Yes, it is complicated, but the cma_process_remove() won't proceed
past cma_dev_put() until all the ULPs have gone through _destroy_id()

So all this does is move the reaping of the listens to the destroy_id
time

Jason

      reply	other threads:[~2021-09-15 13:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-13  9:33 Tao Liu
2021-09-13 11:16 ` Leon Romanovsky
2021-09-14 19:54 ` Jason Gunthorpe
2021-09-14 23:17   ` Leon Romanovsky
2021-09-16 13:57     ` Jason Gunthorpe
2021-09-15  6:34   ` Mark Zhang
2021-09-15 13:18     ` Jason Gunthorpe [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=20210915131845.GK4065468@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=avihaih@nvidia.com \
    --cc=dledford@redhat.com \
    --cc=haakon.bugge@oracle.com \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=markzhang@nvidia.com \
    --cc=shayd@nvidia.com \
    --cc=thomas.liu@ucloud.cn \
    --cc=thomas.liu@ucloud.com \
    --subject='Re: [PATCH] RDMA/cma: Fix listener leak in rdma_cma_listen_on_all() failure' \
    /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

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