kernel_samsung_a53x/drivers/nvme/host
Christoph Hellwig 664a15be9a nvme-pci: fix freeing of the HMB descriptor table
[ Upstream commit 3c2fb1ca8086eb139b2a551358137525ae8e0d7a ]

The HMB descriptor table is sized to the maximum number of descriptors
that could be used for a given device, but __nvme_alloc_host_mem could
break out of the loop earlier on memory allocation failure and end up
using less descriptors than planned for, which leads to an incorrect
size passed to dma_free_coherent.

In practice this was not showing up because the number of descriptors
tends to be low and the dma coherent allocator always allocates and
frees at least a page.

Fixes: 87ad72a59a38 ("nvme-pci: implement host memory buffer support")
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-12-17 13:23:59 +01:00
..
core.c nvme: fix metadata handling in nvme-passthrough 2024-12-17 13:23:58 +01:00
fabrics.c
fabrics.h
fault_inject.c
fc.c nvme-fc: do not wait in vain when unloading module 2024-11-18 22:25:33 +01:00
fc.h
hwmon.c
Kconfig
lightnvm.c
Makefile
multipath.c nvme-multipath: find NUMA path only for online numa-node 2024-11-19 14:19:42 +01:00
nvme.h
pci.c nvme-pci: fix freeing of the HMB descriptor table 2024-12-17 13:23:59 +01:00
rdma.c
tcp.c
trace.c
trace.h
zns.c