]> git.hungrycats.org Git - linux/commit
RDMA/mana_ib: boundary check before installing cq callbacks
authorKonstantin Taranov <kotaranov@microsoft.com>
Fri, 26 Apr 2024 13:12:39 +0000 (06:12 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 May 2024 07:49:46 +0000 (09:49 +0200)
commitf12afddfb142587d786df9e3cc4862190d3e2ec8
treed3f3f43920fd214f68305532335437f93c633f61
parent19dbfaa0d127671f8ce505371eede383be195f39
RDMA/mana_ib: boundary check before installing cq callbacks

[ Upstream commit f79edef79b6a2161f4124112f9b0c46891bb0b74 ]

Add a boundary check inside mana_ib_install_cq_cb to prevent index overflow.

Fixes: 2a31c5a7e0d8 ("RDMA/mana_ib: Introduce mana_ib_install_cq_cb helper function")
Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com>
Link: https://lore.kernel.org/r/1714137160-5222-5-git-send-email-kotaranov@linux.microsoft.com
Reviewed-by: Long Li <longli@microsoft.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/hw/mana/cq.c