Commit 61b717d0 authored by Bart Van Assche's avatar Bart Van Assche Committed by Jason Gunthorpe

RDMA/rxe: Set wqe->status correctly if an unexpected response is received

Every function that returns COMPST_ERROR must set wqe->status to another
value than IB_WC_SUCCESS before returning COMPST_ERROR. Fix the only code
path for which this is not yet the case.
Signed-off-by: default avatarBart Van Assche <bart.vanassche@wdc.com>
Cc: <stable@vger.kernel.org>
Reviewed-by: default avatarYuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent 2e51e45c
...@@ -276,6 +276,7 @@ static inline enum comp_state check_ack(struct rxe_qp *qp, ...@@ -276,6 +276,7 @@ static inline enum comp_state check_ack(struct rxe_qp *qp,
case IB_OPCODE_RC_RDMA_READ_RESPONSE_MIDDLE: case IB_OPCODE_RC_RDMA_READ_RESPONSE_MIDDLE:
if (wqe->wr.opcode != IB_WR_RDMA_READ && if (wqe->wr.opcode != IB_WR_RDMA_READ &&
wqe->wr.opcode != IB_WR_RDMA_READ_WITH_INV) { wqe->wr.opcode != IB_WR_RDMA_READ_WITH_INV) {
wqe->status = IB_WC_FATAL_ERR;
return COMPST_ERROR; return COMPST_ERROR;
} }
reset_retry_counters(qp); reset_retry_counters(qp);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment