]> www.infradead.org Git - nvme.git/commit
nvme-pci: use correct size to free the hmb buffer nvme-6.14-2025-01-12
authorFrancis Pravin <francis.p@samsung.com>
Thu, 9 Jan 2025 23:51:37 +0000 (05:21 +0530)
committerKeith Busch <kbusch@kernel.org>
Sun, 12 Jan 2025 22:11:29 +0000 (14:11 -0800)
commit4a324970fabad503260973cd588609f3a26baab9
tree5f8d27bafdc4ad72f8e5747efe37c5c9a91b635d
parentd4a95adeabc6b5a39405e49c6d5ed14dd83682c4
nvme-pci: use correct size to free the hmb buffer

dev->host_mem_size value is updated only after the successful buffer
allocation of hmb descriptor. Otherwise, it may have some undefined value.
So, use the correct size to free the hmb buffer when the hmb descriptor
buffer allocation failed.

Signed-off-by: Francis Pravin <francis.p@samsung.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/host/pci.c