On 17.12.24 03:02, Liu Shixin wrote:
On 2024/12/16 23:34, David Hildenbrand wrote:
On 14.12.24 11:44, Liu Shixin wrote:
The folio refcount may be increased unexpectly through try_get_folio() by
caller such as split_huge_pages. In huge_pmd_unshare(), we use refcount to
check whether a pmd page table is shared. The check is incorrect if the
refcount is increased by the above caller, and this can cause the page
table leaked:
Are you sure it is "leaked" ?
I assume what happens is that we end up freeing a page table without calling its constructor. That's why page freeing code complains about "nonzero mapcount" (overlayed by something else).
1. The page table itself will be discarded after reporting the "nonzero mapcount".
2. The HugeTLB page mapped by the page table miss freeing since we treat the page table as shared
and a shared page table will not be to unmap.
Ah, the page table still maps something, that makes sense. So we're
leaking that indeed.
--
Cheers,
David / dhildenb