]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
RDMA/mthca: Fix crash when polling CQ for shared QPs
authorThomas Bogendoerfer <tbogendoerfer@suse.de>
Thu, 13 Jul 2023 14:16:58 +0000 (16:16 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Aug 2023 08:22:38 +0000 (10:22 +0200)
commit3ad5f655eb8a61e6a4f4322983a942d2276e17d4
tree3e8ba2070a615833454824aecd2b7317f0e415d3
parentc5b5dbcbf91f769b8eb25f88e32a1522f920f37a
RDMA/mthca: Fix crash when polling CQ for shared QPs

[ Upstream commit dc52aadbc1849cbe3fcf6bc54d35f6baa396e0a1 ]

Commit 21c2fe94abb2 ("RDMA/mthca: Combine special QP struct with mthca QP")
introduced a new struct mthca_sqp which doesn't contain struct mthca_qp
any longer. Placing a pointer of this new struct into qptable leads
to crashes, because mthca_poll_one() expects a qp pointer. Fix this
by putting the correct pointer into qptable.

Fixes: 21c2fe94abb2 ("RDMA/mthca: Combine special QP struct with mthca QP")
Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
Link: https://lore.kernel.org/r/20230713141658.9426-1-tbogendoerfer@suse.de
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/hw/mthca/mthca_qp.c