linux/drivers/vfio
Zilin Guan 81b43dd85c vfio/pds: replace bitmap_free with vfree
[ Upstream commit acb59a4bb8 ]

host_seq_bmp is allocated with vzalloc but is currently freed with
bitmap_free, which uses kfree internally. This mismach prevents the
resource from being released properly and may result in memory leaks
or other issues.

Fix this by freeing host_seq_bmp with vfree to match the vzalloc
allocation.

Fixes: f232836a91 ("vfio/pds: Add support for dirty page tracking")
Signed-off-by: Zilin Guan <zilin@seu.edu.cn>
Reviewed-by: Brett Creeley <brett.creeley@amd.com>
Link: https://lore.kernel.org/r/20250913153154.1028835-1-zilin@seu.edu.cn
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2025-10-15 12:00:14 +02:00
..
cdx vfio/cdx: add interrupt support 2024-04-23 14:31:38 -06:00
fsl-mc vfio/fsl-mc: Remove unused variable 'hwirq' 2024-09-03 08:42:06 -06:00
mdev vfio/mdev: Constify struct kobj_type 2024-09-06 08:20:52 -06:00
pci vfio/pds: replace bitmap_free with vfree 2025-10-15 12:00:14 +02:00
platform Revert "vfio/platform: check the bounds of read/write syscalls" 2025-02-21 14:01:47 +01:00
container.c VFIO updates for v6.3-rc1 2023-02-25 11:52:57 -08:00
debugfs.c vfio/migration: Add debugfs to live migration driver 2023-12-04 14:29:08 -07:00
device_cdev.c vfio: Create vfio_fs_type with inode per device 2024-05-31 15:15:51 -06:00
group.c vfio: Fix unbalanced vfio_df_close call in no-iommu mode 2025-08-15 12:14:02 +02:00
iommufd.c vfio: Fix unbalanced vfio_df_close call in no-iommu mode 2025-08-15 12:14:02 +02:00
Kconfig vfio/migration: Add debugfs to live migration driver 2023-12-04 14:29:08 -07:00
Makefile vfio/migration: Add debugfs to live migration driver 2023-12-04 14:29:08 -07:00
vfio.h vfio: replace CONFIG_HAVE_KVM with IS_ENABLED(CONFIG_KVM) 2024-02-08 08:45:35 -05:00
vfio_iommu_spapr_tce.c vfio/spapr: Always clear TCEs before unsetting the window 2024-06-28 17:03:39 +10:00
vfio_iommu_type1.c vfio/type1: conditional rescheduling while pinning 2025-08-20 18:30:47 +02:00
vfio_main.c vfio: Prevent open_count decrement to negative 2025-08-15 12:14:02 +02:00
virqfd.c introduce fd_file(), convert all accessors to it. 2024-08-12 22:00:43 -04:00