From: Jason Gunthorpe <jgg@nvidia.com>
To: Weihang Li <liweihang@huawei.com>
Cc: dledford@redhat.com, leon@kernel.org, linux-rdma@vger.kernel.org,
linuxarm@huawei.com, Jiaran Zhang <zhangjiaran@huawei.com>,
Lang Cheng <chenglang@huawei.com>
Subject: Re: [PATCH RESEND for-next] RDMA/hns: Solve the problem that dma_pool is used during the reset
Date: Mon, 21 Jun 2021 20:24:59 -0300 [thread overview]
Message-ID: <20210621232459.GA2356494@nvidia.com> (raw)
In-Reply-To: <1623404156-50317-1-git-send-email-liweihang@huawei.com>
On Fri, Jun 11, 2021 at 05:35:56PM +0800, Weihang Li wrote:
> From: Jiaran Zhang <zhangjiaran@huawei.com>
>
> During the reset, the driver calls dma_pool_destroy() to release the
> dma_pool resources. If the dma_pool_free interface is called during the
> modify_qp operation, an exception will occur. The completion
> synchronization mechanism is used to ensure that dma_pool_destroy() is
> executed after the dma_pool_free operation is complete.
This should probably be a simple rwsem instead of faking one up with a
refcount and completion.
The only time you need this pattern is if the code is returning to
userspace, which didn't look like was happening here.
Jason
next prev parent reply other threads:[~2021-06-21 23:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-11 9:35 [PATCH RESEND for-next] RDMA/hns: Solve the problem that dma_pool is used during the reset Weihang Li
2021-06-12 7:00 ` Leon Romanovsky
2021-06-22 7:42 ` liweihang
2021-06-21 23:24 ` Jason Gunthorpe [this message]
2021-06-22 7:43 ` liweihang
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=20210621232459.GA2356494@nvidia.com \
--to=jgg@nvidia.com \
--cc=chenglang@huawei.com \
--cc=dledford@redhat.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=liweihang@huawei.com \
--cc=zhangjiaran@huawei.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