Re: [PATCH] RDMA/cm: Read the remote_id_table root under cm.lock

From: Leon Romanovsky

Date: Mon Nov 16 2026 - 06:24:05 EST



On Wed, 11 Nov 2026 14:19:13 -0500, Changyul Lee wrote:
> cm_find_remote_id() reads the root of cm.remote_id_table before it
> takes cm.lock. While it waits for the lock, cm_destroy_id() or
> cm_reset_to_idle() on another CPU can remove that cm_timewait_info from
> the tree and free it, and the lookup then starts from freed memory.
> This lookup is done for a REJ with reason IB_CM_REJ_TIMEOUT.
>
> Read the root after taking cm.lock.
>
> [...]

Applied, thanks!

[1/1] RDMA/cm: Read the remote_id_table root under cm.lock
https://git.kernel.org/rdma/rdma/c/a6b0e712b0fccc

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