path: root/mm/oom_kill.c
diff options
authorTetsuo Handa <>2018-09-04 15:45:37 -0700
committerLinus Torvalds <>2018-09-04 16:45:02 -0700
commit79cc81057eef7ad846588976296ab0f266c1a7a5 (patch)
treee9dd2511a9cc450959e726624980360347c318c3 /mm/oom_kill.c
parent3100dab2aa09dc6e082956e306fc9f81b3cc0f7a (diff)
mm, oom: fix missing tlb_finish_mmu() in __oom_reap_task_mm().
Commit 93065ac753e4 ("mm, oom: distinguish blockable mode for mmu notifiers") has added an ability to skip over vmas with blockable mmu notifiers. This however didn't call tlb_finish_mmu as it should. As a result inc_tlb_flush_pending has been called without its pairing dec_tlb_flush_pending and all callers mm_tlb_flush_pending would flush even though this is not really needed. This alone is not harmful and it seems there shouldn't be any such callers for oom victims at all but there is no real reason to skip tlb_finish_mmu on early skip either so call it. [ new changelog] Link: Signed-off-by: Tetsuo Handa <> Acked-by: Michal Hocko <> Cc: David Rientjes <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>
Diffstat (limited to 'mm/oom_kill.c')
1 files changed, 1 insertions, 0 deletions
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index 95fbbc46f68f..f10aa5360616 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -522,6 +522,7 @@ bool __oom_reap_task_mm(struct mm_struct *mm)
tlb_gather_mmu(&tlb, mm, start, end);
if (mmu_notifier_invalidate_range_start_nonblock(mm, start, end)) {
+ tlb_finish_mmu(&tlb, start, end);
ret = false;