lkml.org 
[lkml]   [2024]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [syzbot] [mm?] WARNING in __folio_rmap_sanity_checks
From


On 1/5/2024 11:45 PM, David Hildenbrand wrote:
>>> vm_normal_page() works on these mappings, so we'd also have to skip rmap
>>> code when unmapping these pages etc. Maybe that's the whole reason we
>>> have the rmap handling here: to not special-case the unmap path.
>>
>> vm_insert_page() will set VM_MIXEDMAP and vm_normal_page() will skip
>> the page if CONFIG_ARCH_HAS_PTE_SPECIAL is enabled (it's enabled for
>> x86).  So the unmap path will skip these kind of folios?
>
> I think we run into the
>     if (likely(!pte_special(pte)))
>         goto check_pfn;
>
> first and return these folios. That also matches the comment of
> vm_normal_page: "VM_MIXEDMAP mappings can likewise contain memory with
> or without ... _all_ pages with a struct page (that is, those where
> pfn_valid is true) are refcounted and considered normal pages by the VM."
Oh. Yes. This is the path. Thanks a lot for pointing it out to me.


Regards
Yin, Fengwei

\
 
 \ /
  Last update: 2024-01-06 08:41    [W:0.146 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site