From: Jason Gunthorpe <jgg@ziepe.ca>
To: Frank Huang <tigerinxm@gmail.com>
Cc: linux-rdma@vger.kernel.org
Subject: Re: why use _ucma_find_context in ucma_destroy_id?
Date: Wed, 5 Feb 2020 15:20:37 -0400 [thread overview]
Message-ID: <20200205192037.GG28298@ziepe.ca> (raw)
In-Reply-To: <CAKC_zSv3TRgrqg_EX+ZqxQ5FecWk_pEFmDr2C3W=xLhijUOXWQ@mail.gmail.com>
On Wed, Feb 05, 2020 at 06:41:39PM +0800, Frank Huang wrote:
> hi, all
>
> I found that in ucma_destroy_id when using struct ucma_context not use in pair.
>
> 1,
> https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git/tree/drivers/infiniband/core/ucma.c#n611
>
> in line 611 ,use _ucma_find_context, do not call ucma_get_ctx
>
> 2,
> https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git/tree/drivers/infiniband/core/ucma.c#n629
>
> in line 629, use ucma_put_ctx
>
> will this cause an unexpect wait?
It deserves a comment, but the ucma_put_ctx() in ucma_destroy_id pairs
with the atomic_set(1) in ucma_alloc_ctx()
Jason
prev parent reply other threads:[~2020-02-05 19:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-05 10:41 why use _ucma_find_context in ucma_destroy_id? Frank Huang
2020-02-05 19:20 ` 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=20200205192037.GG28298@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=linux-rdma@vger.kernel.org \
--cc=tigerinxm@gmail.com \
/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 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).