aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorMarta Rybczynska <mrybczyn@kalray.eu>2016-03-22 16:02:06 +0100
committerJens Axboe <axboe@fb.com>2016-03-22 10:27:29 -0600
commitd783e0bd02e700e7a893ef4fa71c69438ac1c276 (patch)
treebc2695af55c071b0f9b94027a2691b3e75dc24b0 /block
parentwriteback, cgroup: fix use of the wrong bdi_writeback which mismatches the inode (diff)
downloadlinux-dev-d783e0bd02e700e7a893ef4fa71c69438ac1c276.tar.xz
linux-dev-d783e0bd02e700e7a893ef4fa71c69438ac1c276.zip
nvme: avoid cqe corruption when update at the same time as read
Make sure the CQE phase (validity) is read before the rest of the structure. The phase bit is the highest address and the CQE read will happen on most platforms from lower to upper addresses and will be done by multiple non-atomic loads. If the structure is updated by PCI during the reads from the processor, the processor may get a corrupted copy. The addition of the new nvme_cqe_valid function that verifies the validity bit also allows refactoring of the other CQE read sequences. Signed-off-by: Marta Rybczynska <marta.rybczynska@kalray.eu> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block')
0 files changed, 0 insertions, 0 deletions