RDMA/rxe: Fix access checks in rxe_check_bind_mw
authorBob Pearson <rpearsonhpe@gmail.com>
Tue, 30 May 2023 22:13:32 +0000 (17:13 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Jul 2023 14:21:28 +0000 (16:21 +0200)
commit1afca9e0fe94c65a95c205f695394bc54f3f65b6
tree4ed2ed3916599c105392bc2dd21d41df823e74d9
parent0cd210c594a69e5a7b66c8cfd228e041396e145f
RDMA/rxe: Fix access checks in rxe_check_bind_mw

[ Upstream commit 425e1c9018fdf25cb4531606cc92d9d01a55534f ]

The subroutine rxe_check_bind_mw() in rxe_mw.c performs checks on the mw
access flags before they are set so they always succeed.  This patch
instead checks the access flags passed in the send wqe.

Fixes: 32a577b4c3a9 ("RDMA/rxe: Add support for bind MW work requests")
Link: https://lore.kernel.org/r/20230530221334.89432-4-rpearsonhpe@gmail.com
Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/sw/rxe/rxe_mw.c