Commit d7dcdf9d authored by Israel Rukshin's avatar Israel Rukshin Committed by Christoph Hellwig
Browse files

nvmet-rdma: fix response use after free

nvmet_rdma_release_rsp() may free the response before using it at error

Fixes: 8407879c

 ("nvmet-rdma: fix possible bogus dereference under heavy load")
Signed-off-by: default avatarIsrael Rukshin <>
Reviewed-by: default avatarSagi Grimberg <>
Reviewed-by: default avatarMax Gurtovoy <>
Signed-off-by: default avatarChristoph Hellwig <>
parent 86880d64
......@@ -529,6 +529,7 @@ static void nvmet_rdma_send_done(struct ib_cq *cq, struct ib_wc *wc)
struct nvmet_rdma_rsp *rsp =
container_of(wc->wr_cqe, struct nvmet_rdma_rsp, send_cqe);
struct nvmet_rdma_queue *queue = cq->cq_context;
......@@ -536,7 +537,7 @@ static void nvmet_rdma_send_done(struct ib_cq *cq, struct ib_wc *wc)
wc->status != IB_WC_WR_FLUSH_ERR)) {
pr_err("SEND for CQE 0x%p failed with status %s (%d).\n",
wc->wr_cqe, ib_wc_status_msg(wc->status), wc->status);
Supports Markdown
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