diff options
author | Ming Lei <ming.lei@redhat.com> | 2019-04-09 06:31:22 +0800 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-04-10 09:57:35 -0600 |
commit | eb3afb75b57c28599af0dfa03a99579d410749e9 (patch) | |
tree | a56b6352e2f032e0ff91a73f58917bd7cbae7f26 /drivers/nvme | |
parent | 1b8f21b74c3c9c82fce5a751d7aefb7cc0b8d33d (diff) | |
download | lwn-eb3afb75b57c28599af0dfa03a99579d410749e9.tar.gz lwn-eb3afb75b57c28599af0dfa03a99579d410749e9.zip |
nvme: cancel request synchronously
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@grimberg.me>
Cc: Bart Van Assche <bvanassche@acm.org>
Cc: James Smart <james.smart@broadcom.com>
Cc: linux-nvme@lists.infradead.org
Reviewed-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/nvme')
-rw-r--r-- | drivers/nvme/host/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 470601980794..2c43e12b70af 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -288,7 +288,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); |