Re: [PATCH] RDMA/mthca: Fix off-by-one in mthca_map_user_db()

From: Leon Romanovsky

Date: Tue Nov 03 2026 - 05:05:48 EST



On Fri, 23 Oct 2026 22:23:48 +0300, Serhat Kumral wrote:
> db_tab->page[] has uarc_size / MTHCA_ICM_PAGE_SIZE elements, so valid
> doorbell indices are in the range [0, uarc_size / 8 - 1]. Allowing
> index == uarc_size / 8 results in an out-of-bounds access at
> db_tab->page[npages]. Use '>=' instead of '>' in the bounds check.

Applied, thanks!

[1/1] RDMA/mthca: Fix off-by-one in mthca_map_user_db()
https://git.kernel.org/rdma/rdma/c/0246639e79a413

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