]> git.baikalelectronics.ru Git - kernel.git/commit
mm, oom: fix missing tlb_finish_mmu() in __oom_reap_task_mm().
authorTetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Tue, 4 Sep 2018 22:45:37 +0000 (15:45 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 4 Sep 2018 23:45:02 +0000 (16:45 -0700)
commit6462e7897c70700aaedba3c49a2f428d066f0b83
treee9dd2511a9cc450959e726624980360347c318c3
parent9d52e698460cf7812284902397b7ad7bcd97c589
mm, oom: fix missing tlb_finish_mmu() in __oom_reap_task_mm().

Commit f4db9358e5c1 ("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.

[mhocko@suse.com: new changelog]
Link: http://lkml.kernel.org/r/b752d1d5-81ad-7a35-2394-7870641be51c@i-love.sakura.ne.jp
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/oom_kill.c