mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
PCI/P2PDMA: Release per-CPU pgmap ref when vm_insert_page() fails
[ Upstream commit6220694c52] When vm_insert_page() fails in p2pmem_alloc_mmap(), p2pmem_alloc_mmap() doesn't invoke percpu_ref_put() to free the per-CPU ref of pgmap acquired after gen_pool_alloc_owner(), and memunmap_pages() will hang forever when trying to remove the PCI device. Fix it by adding the missed percpu_ref_put(). Fixes:7e9c7ef83d("PCI/P2PDMA: Allow userspace VMA allocations through sysfs") Signed-off-by: Hou Tao <houtao1@huawei.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Logan Gunthorpe <logang@deltatee.com> Reviewed-by: Alistair Popple <apopple@nvidia.com> Link: https://patch.msgid.link/20251220040446.274991-2-houtao@huaweicloud.com Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
2108e783a7
commit
e19cce88ec
1 changed files with 1 additions and 0 deletions
Loading…
Add table
Add a link
Reference in a new issue