On Tue, Aug 02, 2022 at 04:27:32PM -0500, Bob Pearson wrote: > Currently the rxe driver does not guard changes to the mr state > against race conditions which can arise from races between > local operations and remote invalidate operations. This patch > adds a spinlock to the mr object and makes these state changes > atomic. It also introduces parameters to count the number of > active dma transfers and indicate that an invalidate operation > is pending. > > Signed-off-by: Bob Pearson <rpearsonhpe@xxxxxxxxx> > --- > v2 > Addressed issues raised by Jason Gunthorpe regarding preventing > access to memory after a local or remote invalidate operation > is carried out. The patch was updated to busy wait the invalidate > operation until recent memcpy operations complete while blocking > additional dma operations from starting. > --- > drivers/infiniband/sw/rxe/rxe_loc.h | 6 +- > drivers/infiniband/sw/rxe/rxe_mr.c | 149 +++++++++++++------ > drivers/infiniband/sw/rxe/rxe_req.c | 8 +- > drivers/infiniband/sw/rxe/rxe_resp.c | 200 ++++++++++++-------------- > drivers/infiniband/sw/rxe/rxe_verbs.h | 10 +- > 5 files changed, 204 insertions(+), 169 deletions(-) Applied to rdma-core Thanks, Jason