Thread (5 messages) 5 messages, 3 authors, 2021-06-22

Re: [PATCH RESEND for-next] RDMA/hns: Solve the problem that dma_pool is used during the reset

From: liweihang <hidden>
Date: 2021-06-22 07:43:35

On 2021/6/22 7:25, Jason Gunthorpe wrote:
On Fri, Jun 11, 2021 at 05:35:56PM +0800, Weihang Li wrote:
quoted
From: Jiaran Zhang <redacted>

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help