Re: [PATCH rdma-next v2] RDMA/mlx5: Warn on pending software WCs at CQ destroy
From: Leon Romanovsky
Date: Mon Nov 09 2026 - 04:29:57 EST
On Sun, 08 Nov 2026 18:06:12 +0200, Edward Srouji wrote:
> Software WCs generated by mlx5_ib_generate_wc() are allocated, linked
> onto cq->wc_list and only freed when a consumer polls them. Anything
> still on the list when the CQ is destroyed would be leaked.
>
> This cannot happen with in-tree users. Soft WCs are only generated for
> send completions of the mlx5 GSI QP, and ib_mad is the only creator of
> GSI QPs. Every MAD send holds a reference on its agent until its send
> completion has been processed, unregister_mad_agent() waits for those
> references, and ib_mad_port_close() frees the CQ only after all agents
> on the port are unregistered. Since poll_soft_wc() frees each soft WC
> before its completion handler runs, wc_list is empty by then.
>
> [...]
Applied, thanks!
[1/1] RDMA/mlx5: Warn on pending software WCs at CQ destroy
https://git.kernel.org/rdma/rdma/c/52ace3fd7e1fc1
Best regards,
--
Leon Romanovsky <leon@xxxxxxxxxx>