nvme-rdma corrupts memory upon timeout

Sagi Grimberg sagi at grimberg.me
Mon Feb 26 04:37:13 PST 2018


> This patch still returns to userspace after queuing work and may
> result in corruption.

That's probably that one request being timed out as we complete
it earlier.

Does this patch on top help?
--
diff --git a/drivers/nvme/host/rdma.c b/drivers/nvme/host/rdma.c
index e793b0899d4e..50bbf88b82f6 100644
--- a/drivers/nvme/host/rdma.c
+++ b/drivers/nvme/host/rdma.c
@@ -1590,10 +1590,7 @@ nvme_rdma_timeout(struct request *rq, bool reserved)
         /* queue error recovery */
         nvme_rdma_error_recovery(req->queue->ctrl);

-       /* fail with DNR on cmd timeout */
-       nvme_req(rq)->status = NVME_SC_ABORT_REQ | NVME_SC_DNR;
-
-       return BLK_EH_HANDLED;
+       return BLK_EH_RESET_TIMER;
  }

  /*
--



More information about the Linux-nvme mailing list