From: liweihang <liweihang@huawei.com>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: "dledford@redhat.com" <dledford@redhat.com>,
"leon@kernel.org" <leon@kernel.org>,
"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
Linuxarm <linuxarm@huawei.com>,
zhangjiaran <zhangjiaran@huawei.com>,
chenglang <chenglang@huawei.com>
Subject: Re: [PATCH RESEND for-next] RDMA/hns: Solve the problem that dma_pool is used during the reset
Date: Tue, 22 Jun 2021 07:43:33 +0000 [thread overview]
Message-ID: <6aec1e625e3845cb85e2c987eb2f1f12@huawei.com> (raw)
In-Reply-To: 20210621232459.GA2356494@nvidia.com
On 2021/6/22 7:25, Jason Gunthorpe wrote:
> 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
>
Thank you, we'll think about how to use rwsem to fix this.
Weihang
prev parent reply other threads:[~2021-06-22 7:43 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
2021-06-22 7:43 ` liweihang [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=6aec1e625e3845cb85e2c987eb2f1f12@huawei.com \
--to=liweihang@huawei.com \
--cc=chenglang@huawei.com \
--cc=dledford@redhat.com \
--cc=jgg@nvidia.com \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=linuxarm@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