Skip to content

Commit b024dd0

Browse files
chuckleverjgunthorpe
authored andcommitted
rxe: IB_WR_REG_MR does not capture MR's iova field
FRWR memory registration is done with a series of calls and WRs. 1. ULP invokes ib_dma_map_sg() 2. ULP invokes ib_map_mr_sg() 3. ULP posts an IB_WR_REG_MR on the Send queue Step 2 generates an iova. It is permissible for ULPs to change this iova (with certain restrictions) between steps 2 and 3. rxe_map_mr_sg captures the MR's iova but later when rxe processes the REG_MR WR, it ignores the MR's iova field. If a ULP alters the MR's iova after step 2 but before step 3, rxe never captures that change. When the remote sends an RDMA Read targeting that MR, rxe looks up the R_key, but the altered iova does not match the iova stored in the MR, causing the RDMA Read request to fail. Reported-by: Anna Schumaker <schumaker.anna@gmail.com> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
1 parent bfc5d83 commit b024dd0

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/infiniband/sw/rxe/rxe_req.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,7 @@ int rxe_requester(void *arg)
643643
rmr->access = wqe->wr.wr.reg.access;
644644
rmr->lkey = wqe->wr.wr.reg.key;
645645
rmr->rkey = wqe->wr.wr.reg.key;
646+
rmr->iova = wqe->wr.wr.reg.mr->iova;
646647
wqe->state = wqe_state_done;
647648
wqe->status = IB_WC_SUCCESS;
648649
} else {

0 commit comments

Comments
 (0)