diff options
author | Akhilesh Patil <akhilesh@ee.iitb.ac.in> | 2025-08-10 16:34:01 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2025-08-18 17:10:40 +0300 |
commit | 8fe8a092043f28d3c8e467cb2bbfe1e1ccf7f996 (patch) | |
tree | 6b8435d1e7407b38bdac36f2fcb63d9f3f358095 /tools/testing/selftests/bpf/prog_tests/prog_array_init.c | |
parent | c17b750b3ad9f45f2b6f7e6f7f4679844244f0b9 (diff) | |
download | linux-8fe8a092043f28d3c8e467cb2bbfe1e1ccf7f996.tar.xz |
iommufd: viommu: free memory allocated by kvcalloc() using kvfree()
Use kvfree() instead of kfree() to free pages allocated by kvcalloc()
in iommufs_hw_queue_alloc_phys() to fix potential memory corruption.
Ensure the memory is properly freed, as kvcalloc may internally use
vmalloc or kmalloc depending on available memory in the system.
Fixes: 2238ddc2b056 ("iommufd/viommu: Add IOMMUFD_CMD_HW_QUEUE_ALLOC ioctl")
Link: https://patch.msgid.link/r/aJifyVV2PL6WGEs6@bhairav-test.ee.iitb.ac.in
Signed-off-by: Akhilesh Patil <akhilesh@ee.iitb.ac.in>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Nicolin Chen <nicolinc@nvidia.com>
Reviewed-by: Pranjal Shrivastava <praan@google.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/prog_array_init.c')
0 files changed, 0 insertions, 0 deletions