summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeith Busch <kbusch@kernel.org>2021-10-06 23:50:31 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-10-20 11:45:03 +0200
commit6fecdb5b54a5d37e5c018307ea9180502c85d158 (patch)
tree14e1e51b69f061025543f48667c9e9e472f60fb7
parent2d937cc12c140b2eb20cbb0fc8502d7232f18fe3 (diff)
downloadlinux-stable-6fecdb5b54a5d37e5c018307ea9180502c85d158.tar.gz
linux-stable-6fecdb5b54a5d37e5c018307ea9180502c85d158.tar.bz2
linux-stable-6fecdb5b54a5d37e5c018307ea9180502c85d158.zip
nvme-pci: Fix abort command id
commit 85f74acf097a63a07f5a7c215db6883e5c35e3ff upstream. The request tag is no longer the only component of the command id. Fixes: e7006de6c2380 ("nvme: code command_id with a genctr for use-after-free validation") Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Keith Busch <kbusch@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/nvme/host/pci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index d79abb88a0c6..1b85349f57af 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -1342,7 +1342,7 @@ static enum blk_eh_timer_return nvme_timeout(struct request *req, bool reserved)
memset(&cmd, 0, sizeof(cmd));
cmd.abort.opcode = nvme_admin_abort_cmd;
- cmd.abort.cid = req->tag;
+ cmd.abort.cid = nvme_cid(req);
cmd.abort.sqid = cpu_to_le16(nvmeq->qid);
dev_warn(nvmeq->dev->ctrl.device,