Re: [PATCH v2] RDMA/irdma: do not acquire zero-reference listeners

From: Leon Romanovsky

Date: Thu Dec 03 2026 - 15:11:46 EST



On Thu, 03 Dec 2026 03:16:03 +0000, Jaeyeong Lee wrote:
> irdma_dec_refcnt_listen() can drop a listener reference count to zero
> before taking listen_list_lock to remove it from the lookup list. During
> this window, irdma_find_listener() can find the listener and call
> refcount_inc() on the zero count. It then returns a listener that the
> teardown path is about to free.
>
> Use refcount_inc_not_zero() while holding listen_list_lock. If the
> listener has reached zero, skip it and let the teardown path remove it
> from the list.
>
> [...]

Applied, thanks!

[1/1] RDMA/irdma: do not acquire zero-reference listeners
https://git.kernel.org/rdma/rdma/c/1d51d64fd95d2a

Best regards,
--
Leon Romanovsky <leon@xxxxxxxxxx>