Thread (3 messages) 3 messages, 2 authors, 2021-05-25

Re: [RFC PATCH 2/2] mm/mremap: Fix race between MOVE_PUD mremap and pageout

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2021-05-25 17:29:00
Also in: linux-mm

On Mon, May 24, 2021 at 10:34 PM Aneesh Kumar K.V
[off-list ref] wrote:
quoted hunk ↗ jump to hunk
@@ -221,6 +222,9 @@ static inline void page_vma_mapped_walk_done(struct page_vma_mapped_walk *pvmw)
                spin_unlock(pvmw->pte_ptl);
        if (pvmw->pmd_ptl)
                spin_unlock(pvmw->pmd_ptl);
+       if (pvmw->pud_ptl)
+               spin_unlock(pvmw->pud_ptl);
+
 }
You have this habit of adding odd whitespace..

But yes, this seems to be the right way to fix the races properly. The
pageout code is special, the pageout code is normally not critical, so
it's the pageout code that should go the extra mile to make up for the
fact that it doesn't hold the mmap_sem like good page table
modification codepaths do.

                Linus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help