summaryrefslogtreecommitdiff
path: root/drivers/nvme/host
diff options
context:
space:
mode:
authorKeith Busch <kbusch@kernel.org>2021-10-07 09:50:31 +0300
committerKeith Busch <kbusch@kernel.org>2021-10-07 18:02:06 +0300
commit85f74acf097a63a07f5a7c215db6883e5c35e3ff (patch)
tree24ef0506929a822cfa6590839ebdcf5a8967cb33 /drivers/nvme/host
parent298ba0e3d4af539cc37f982d4c011a0f07fca48c (diff)
downloadlinux-85f74acf097a63a07f5a7c215db6883e5c35e3ff.tar.xz
nvme-pci: Fix abort command id
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>
Diffstat (limited to 'drivers/nvme/host')
-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 b82492cd7503..7fc992a99624 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -1330,7 +1330,7 @@ static enum blk_eh_timer_return nvme_timeout(struct request *req, bool reserved)
iod->aborted = 1;
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,