]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm/khugepaged: write-lock VMA while collapsing a huge page
authorSuren Baghdasaryan <surenb@google.com>
Sat, 11 Jun 2022 04:32:23 +0000 (21:32 -0700)
committerSuren Baghdasaryan <surenb@google.com>
Wed, 23 Nov 2022 02:09:45 +0000 (02:09 +0000)
commit3a719cc9aa00866bb2fddf99bf39a84a83dae276
treeb96c48773e0bb7a39f92d398975ebd56c58a2a39
parent74ddcf5173c9ff1bbf487d4049ab99162eb2174e
mm/khugepaged: write-lock VMA while collapsing a huge page

Protect VMA from concurrent page fault handler while collapsing a huge
page. Page fault handler needs a stable PMD to use PTL and relies on
per-VMA lock to prevent concurrent PMD changes. pmdp_collapse_flush(),
set_huge_pmd() and collapse_and_free_pmd() can modify a PMD, which will
not be detected by a page fault handler without proper locking.

Signed-off-by: Suren Baghdasaryan <surenb@google.com>
mm/khugepaged.c