]> www.infradead.org Git - users/jedix/linux-maple.git/commit
nvme: fix uninitialized prp2 value on small transfers
authorJan H. Schönherr <jschoenh@amazon.de>
Sun, 27 Aug 2017 13:56:37 +0000 (15:56 +0200)
committerJack Vogel <jack.vogel@oracle.com>
Thu, 15 Mar 2018 03:13:26 +0000 (20:13 -0700)
commit6a7473336dca2c445c0fd4972c3fdb9f6cabd54e
tree6ca6eb9fbc1a0ed72f4bfaf459335bd4b4ee28f5
parent5ee90451dd8513459f3daa8b8c2995aeec053cc6
nvme: fix uninitialized prp2 value on small transfers

The value of iod->first_dma ends up as prp2 in NVMe commands. In case
there is not enough data to cross a page boundary, iod->first_dma is
never initialized and contains random data.

Comply with the NVMe specification and fill in 0 in that case.

Signed-off-by: Jan H. Schönherr <jschoenh@amazon.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
(cherry picked from commit 5228b3280b9bb8fa6aef59f891cca64a028e9b36)

Orabug: 27624149

Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Ashok Vairavan <ashok.vairavan@oracle.com>
drivers/nvme/host/pci.c