summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2020-05-16 13:24:41 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2020-05-16 13:24:41 -0700
commit3d1c1e5931ce45b3a3f309385bbc00c78e9951c6 (patch)
tree39514214185b9c50678301e7c3f9436a7ffd44a6 /drivers
parentcf0ca701a01cf631333855831fe48b717ed1f20b (diff)
parent3948955397511ad5b68dc65fa11fad941d71d307 (diff)
Merge tag 'block-5.7-2020-05-16' of git://git.kernel.dk/linux-block
Pull block fix from Jens Axboe: "Just a single NVMe pull in here, with a single fix for a missing DMA read memory barrier for completions" * tag 'block-5.7-2020-05-16' of git://git.kernel.dk/linux-block: nvme-pci: dma read memory barrier for completions
Diffstat (limited to 'drivers')
-rw-r--r--drivers/nvme/host/pci.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index e13c370de830..3726dc780d15 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -989,6 +989,11 @@ static inline int nvme_process_cq(struct nvme_queue *nvmeq)
while (nvme_cqe_pending(nvmeq)) {
found++;
+ /*
+ * load-load control dependency between phase and the rest of
+ * the cqe requires a full read memory barrier
+ */
+ dma_rmb();
nvme_handle_cqe(nvmeq, nvmeq->cq_head);
nvme_update_cq_head(nvmeq);
}