Re: [PATCH] mm: hugetlb: independent PMD page table shared count

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 16.12.24 19:33, jane.chu@xxxxxxxxxx wrote:
On 12/14/2024 2:44 AM, 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:

hugetlb and THP don't overlap, right?  how does split_huge_pages() end
up messing up huge_pmd_share() ?

Am I missing something?


If first grabs a reference to then check if it's a THP. So we can end up grabbing anything temporarily.


In general, we'll have to be smarter about what we try grabbing, but handling races for now is tricky.

--
Cheers,

David / dhildenb





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux