Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'vfio-v6.0-rc5' of https://github.com/awilliam/linux-vfio

Pull VFIO fix from Alex Williamson:

- Fix zero page refcount leak (Alex Williamson)

* tag 'vfio-v6.0-rc5' of https://github.com/awilliam/linux-vfio:
vfio/type1: Unpin zero pages

+12
+12
drivers/vfio/vfio_iommu_type1.c
··· 558 558 ret = pin_user_pages_remote(mm, vaddr, npages, flags | FOLL_LONGTERM, 559 559 pages, NULL, NULL); 560 560 if (ret > 0) { 561 + int i; 562 + 563 + /* 564 + * The zero page is always resident, we don't need to pin it 565 + * and it falls into our invalid/reserved test so we don't 566 + * unpin in put_pfn(). Unpin all zero pages in the batch here. 567 + */ 568 + for (i = 0 ; i < ret; i++) { 569 + if (unlikely(is_zero_pfn(page_to_pfn(pages[i])))) 570 + unpin_user_page(pages[i]); 571 + } 572 + 561 573 *pfn = page_to_pfn(pages[0]); 562 574 goto done; 563 575 }