Re: [PATCH 1/2] RDMA/erdma: Hold CQ references when processing EQ events
Leon Romanovsky <[email protected]>
| Newsgroups | org.kernel.vger.linux-rdma |
|---|---|
| Message-ID | <[email protected]> |
On Thu, 30 Jul 2026 20:43:53 +0800, Cheng Xu wrote:
> EQ handlers look up CQs from dev->cq_xa and invoke CQ completion or
> error callbacks outside the xarray lock. erdma_destroy_cq() can erase the
> CQ from the xarray and free its queue buffer and doorbell record while a
> previously scheduled EQ handler is still using the CQ.
>
> Add a CQ refcount and take a reference under the xarray lock with
> refcount_inc_not_zero(). Remove the CQ from the xarray before dropping
> the destroy-path reference, then wait for in-flight EQ users before
> releasing CQ resources.
>
> [...]
Applied, thanks!
[1/2] RDMA/erdma: Hold CQ references when processing EQ events
https://git.kernel.org/rdma/rdma/c/98df2aee1459ee
[2/2] RDMA/erdma: Hold QP references for AE and CM processing
https://git.kernel.org/rdma/rdma/c/a52eeff32024f1
Best regards,
--
Leon Romanovsky <[email protected]>