[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190427013838.6596-67-sashal@kernel.org>
Date: Fri, 26 Apr 2019 21:38:26 -0400
From: Sasha Levin <sashal@...nel.org>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
Cc: Ming Lei <ming.lei@...hat.com>, Sagi Grimberg <sagi@...mberg.me>,
Bart Van Assche <bvanassche@....org>,
James Smart <james.smart@...adcom.com>,
linux-nvme@...ts.infradead.org, Jens Axboe <axboe@...nel.dk>,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH AUTOSEL 5.0 67/79] nvme: cancel request synchronously
From: Ming Lei <ming.lei@...hat.com>
[ Upstream commit eb3afb75b57c28599af0dfa03a99579d410749e9 ]
nvme_cancel_request() is used in error handler, and it is always
reliable to cancel request synchronously, and avoids possible race
in which request may be completed after real hw queue is destroyed.
One issue is reported by our customer on NVMe RDMA, in which freed ib
queue pair may be used in nvme_rdma_complete_rq().
Cc: Sagi Grimberg <sagi@...mberg.me>
Cc: Bart Van Assche <bvanassche@....org>
Cc: James Smart <james.smart@...adcom.com>
Cc: linux-nvme@...ts.infradead.org
Reviewed-by: Keith Busch <keith.busch@...el.com>
Reviewed-by: Christoph Hellwig <hch@....de>
Signed-off-by: Ming Lei <ming.lei@...hat.com>
Signed-off-by: Jens Axboe <axboe@...nel.dk>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
drivers/nvme/host/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 6a9dd68c0f4f..4c4413ad3ceb 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -291,7 +291,7 @@ bool nvme_cancel_request(struct request *req, void *data, bool reserved)
"Cancelling I/O %d", req->tag);
nvme_req(req)->status = NVME_SC_ABORT_REQ;
- blk_mq_complete_request(req);
+ blk_mq_complete_request_sync(req);
return true;
}
EXPORT_SYMBOL_GPL(nvme_cancel_request);
--
2.19.1
Powered by blists - more mailing lists