[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210915131845.GK4065468@nvidia.com>
Date: Wed, 15 Sep 2021 10:18:45 -0300
From: Jason Gunthorpe <jgg@...dia.com>
To: Mark Zhang <markzhang@...dia.com>
Cc: Tao Liu <thomas.liu@...oud.cn>, dledford@...hat.com,
leon@...nel.org, haakon.bugge@...cle.com, shayd@...dia.com,
avihaih@...dia.com, linux-rdma@...r.kernel.org,
linux-kernel@...r.kernel.org, thomas.liu@...oud.com
Subject: Re: [PATCH] RDMA/cma: Fix listener leak in rdma_cma_listen_on_all()
failure
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
Powered by blists - more mailing lists