nvme-pci: fix page size checks
authorKeith Busch <kbusch@kernel.org>
Mon, 19 Dec 2022 21:54:55 +0000 (13:54 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Jan 2023 10:58:42 +0000 (11:58 +0100)
commit4c5fee0d883abfb68794a4df9fa89ea6f072f1b8
tree8ff8f8da7329b82830cba6f82cbb6f69fdc9be38
parent9141144b37f30e3e7fa024bcfa0a13011e546ba9
nvme-pci: fix page size checks

[ Upstream commit 841734234a28fd5cd0889b84bd4d93a0988fa11e ]

The size allocated out of the dma pool is at most NVME_CTRL_PAGE_SIZE,
which may be smaller than the PAGE_SIZE.

Fixes: c61b82c7b7134 ("nvme-pci: fix PRP pool size")
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/nvme/host/pci.c