lkml.org 
[lkml]   [2021]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v9 03/10] mm/rmap: Split try_to_munlock from try_to_unmap
On Fri, Jun 4, 2021 at 8:39 PM Liam Howlett <liam.howlett@oracle.com> wrote:
>
> > Particularly the following paragraph:
> > ...
> > Vlastimil Babka points out another race which this patch protects against.
> > try_to_unmap_one() might reach its mlock_vma_page() TestSetPageMlocked a
> > moment after munlock_vma_pages_all() did its Phase 1 TestClearPageMlocked:
> > leaving PageMlocked and unevictable when it should be evictable. mmap_sem
> > is ineffective because exit_mmap() does not hold it; page lock ineffective
> > because __munlock_pagevec() only takes it afterwards, in Phase 2; pte lock
> > is effective because __munlock_pagevec_fill() takes it to get the page,
> > after VM_LOCKED was cleared from vm_flags, so visible to try_to_unmap_one.
> > ...
>
> So this is saying the race with exit_mmap() isn't benign after all?
>

Yes, not benign at all.

\
 
 \ /
  Last update: 2021-06-05 06:20    [W:0.137 / U:1.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site