Commit 60e3480e authored by Israel Rukshin's avatar Israel Rukshin Committed by Greg Kroah-Hartman
Browse files

nvmet-rdma: fix response use after free

[ Upstream commit d7dcdf9d ]

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 <>
Signed-off-by: default avatarSasha Levin <>
parent 07d4f1c4
......@@ -524,6 +524,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;
......@@ -531,7 +532,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);
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