mm/pagewalk.c: fix walk_page_range() access of wrong PTEs
[sfrench/cifs-2.6.git] / mm / oom_kill.c
index 98e75f2ac7bc3ad01f1287e9697948e6212610d4..6738c47f1f7280edc5f3fe610b2658195a0a77e0 100644 (file)
@@ -678,9 +678,12 @@ out:
  */
 void pagefault_out_of_memory(void)
 {
-       struct zonelist *zonelist = node_zonelist(first_online_node,
-                                                 GFP_KERNEL);
+       struct zonelist *zonelist;
 
+       if (mem_cgroup_oom_synchronize(true))
+               return;
+
+       zonelist = node_zonelist(first_online_node, GFP_KERNEL);
        if (try_set_zonelist_oom(zonelist, GFP_KERNEL)) {
                out_of_memory(NULL, 0, 0, NULL, false);
                clear_zonelist_oom(zonelist, GFP_KERNEL);