mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 16:21:45 -04:00
Merge tag 'vfio-v6.4-rc4' of https://github.com/awilliam/linux-vfio
Pull VFIO fix from Alex Williamson: - Test for and return error for invalid pfns through the pin pages interface (Yan Zhao) * tag 'vfio-v6.4-rc4' of https://github.com/awilliam/linux-vfio: vfio/type1: check pfn valid before converting to struct page
This commit is contained in:
@@ -860,6 +860,11 @@ static int vfio_iommu_type1_pin_pages(void *iommu_data,
|
||||
if (ret)
|
||||
goto pin_unwind;
|
||||
|
||||
if (!pfn_valid(phys_pfn)) {
|
||||
ret = -EINVAL;
|
||||
goto pin_unwind;
|
||||
}
|
||||
|
||||
ret = vfio_add_to_pfn_list(dma, iova, phys_pfn);
|
||||
if (ret) {
|
||||
if (put_pfn(phys_pfn, dma->prot) && do_accounting)
|
||||
|
||||
Reference in New Issue
Block a user