Re: [PATCH] RDMA/mlx5: Check the DM type before mapping a MEMIC operation

From: Leon Romanovsky

Date: Mon Nov 16 2026 - 08:23:08 EST



On Sun, 15 Nov 2026 10:43:42 +0000, Hungyu Lin wrote:
> MLX5_IB_METHOD_DM_MAP_OP_ADDR accepts a handle to any DM object and
> converts it with to_memic() without checking the DM type. The handle can
> refer to a SW ICM object, which is a struct mlx5_ib_dm_icm and is
> smaller than struct mlx5_ib_dm_memic.
>
> The handler then uses the ops_xa_lock, ops and ref members, which are
> all located past the end of the mlx5_ib_dm_icm allocation, so it locks
> and modifies memory that belongs to other slab objects.
>
> [...]

Applied, thanks!

[1/1] RDMA/mlx5: Check the DM type before mapping a MEMIC operation
https://git.kernel.org/rdma/rdma/c/ea97d0a83f4ed6

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