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>
Wed, 4 Jan 2023 10:28:49 +0000 (11:28 +0100)
commitd1136b10944e0fe2d32ceca9d298ffc9d578c78d
tree8db7d16ddb782796d0a174c290136e0cf4aa7f4c
parentb1814724e0d7162bdf4799f2d565381bc2251c63
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