diff options
author | Sergey Senozhatsky <senozhatsky@chromium.org> | 2024-01-26 06:25:48 +0300 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2024-02-08 08:20:35 +0300 |
commit | 4c2da3188b848d33c26d7f0f8b14f3150331c923 (patch) | |
tree | 731056e82135234dfb0b2dca986b7f1f4444698a | |
parent | e870920bbe68e52335a4c31a059e6af6a9a59dbb (diff) | |
download | linux-4c2da3188b848d33c26d7f0f8b14f3150331c923.tar.xz |
mm/madvise: don't forget to leave lazy MMU mode in madvise_cold_or_pageout_pte_range()
We need to leave lazy MMU mode before unlocking.
Link: https://lkml.kernel.org/r/20240126032608.355899-1-senozhatsky@chromium.org
Fixes: b2f557a21bc8 ("mm/madvise: add cond_resched() in madvise_cold_or_pageout_pte_range()")
Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Jiexun Wang <wangjiexun@tinylab.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r-- | mm/madvise.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mm/madvise.c b/mm/madvise.c index 912155a94ed5..cfa5e7288261 100644 --- a/mm/madvise.c +++ b/mm/madvise.c @@ -429,6 +429,7 @@ restart: if (++batch_count == SWAP_CLUSTER_MAX) { batch_count = 0; if (need_resched()) { + arch_leave_lazy_mmu_mode(); pte_unmap_unlock(start_pte, ptl); cond_resched(); goto restart; |