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)
committerSagi Grimberg <sagi@grimberg.me>
Mon, 28 Aug 2017 20:00:44 +0000 (23:00 +0300)
commit5228b3280b9bb8fa6aef59f891cca64a028e9b36
tree28be145a848ae793071ac7b8800dc6cb36eb353c
parenta7b7c7a105a528e6c2a0a2581b814a5acacb4c38
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>
drivers/nvme/host/pci.c