mm/memory.c: fix mem_cgroup_oom_disable() call missing
authorLaurent Dufour <[email protected]>
Fri, 8 Sep 2017 23:13:12 +0000 (16:13 -0700)
committerLinus Torvalds <[email protected]>
Sat, 9 Sep 2017 01:26:47 +0000 (18:26 -0700)
commitde0c799bba2610a8e1e9a50d76a28614520a4cd4
treefd5cd44d785668802eb9a2982d1465be15270f39
parent475d0487a2adb1718892856078861d430d81fc55
mm/memory.c: fix mem_cgroup_oom_disable() call missing

Seen while reading the code, in handle_mm_fault(), in the case
arch_vma_access_permitted() is failing the call to
mem_cgroup_oom_disable() is not made.

To fix that, move the call to mem_cgroup_oom_enable() after calling
arch_vma_access_permitted() as it should not have entered the memcg OOM.

Link: http://lkml.kernel.org/r/[email protected]
Fixes: bae473a423f6 ("mm: introduce fault_env")
Signed-off-by: Laurent Dufour <[email protected]>
Acked-by: Kirill A. Shutemov <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/memory.c