]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/rxe: Fix deadlock in rxe_do_local_ops()
authorBob Pearson <rpearsonhpe@gmail.com>
Mon, 23 May 2022 22:32:52 +0000 (17:32 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:23:46 +0000 (14:23 +0200)
commitea82398f2c201d65f37b694dcf715d7ce6505c51
treec09286041db2d515429e37a0c024cf799b9faed1
parent2d1660183adbb1c5cb8da902e946ca99a62f0bf3
RDMA/rxe: Fix deadlock in rxe_do_local_ops()

[ Upstream commit 1b6f24335c42a67aac79b3f2bc0781b7a5931063 ]

When a local operation (invalidate mr, reg mr, bind mw) is finished there
will be no ack packet coming from a responder to cause the wqe to be
completed. This may happen anyway if a subsequent wqe performs
IO. Currently if the wqe is signalled the completer tasklet is scheduled
immediately but not otherwise.

This leads to a deadlock if the next wqe has the fence bit set in send
flags and the operation is not signalled. This patch removes the condition
that the wqe must be signalled in order to schedule the completer tasklet
which is the simplest fix for this deadlock and is fairly low cost. This
is the analog for local operations of always setting the ackreq bit in all
last or only request packets even if the operation is not signalled.

Link: https://lore.kernel.org/r/20220523223251.15350-1-rpearsonhpe@gmail.com
Reported-by: Jenny Hack <jhack@hpe.com>
Fixes: 3e1cf5f469ef ("RDMA/rxe: Move local ops to subroutine")
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_req.c