mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-15 23:25:07 +00:00
rxe: IB_WR_REG_MR does not capture MR's iova field
[ Upstream commit b024dd0eba
]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
fbbfb5c6bf
commit
ce91ad1a6f
1 changed files with 1 additions and 0 deletions
|
@ -640,6 +640,7 @@ int rxe_requester(void *arg)
|
|||
rmr->access = wqe->wr.wr.reg.access;
|
||||
rmr->lkey = wqe->wr.wr.reg.key;
|
||||
rmr->rkey = wqe->wr.wr.reg.key;
|
||||
rmr->iova = wqe->wr.wr.reg.mr->iova;
|
||||
wqe->state = wqe_state_done;
|
||||
wqe->status = IB_WC_SUCCESS;
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue