aboutsummaryrefslogtreecommitdiffstats
path: root/mm/oom_kill.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/oom_kill.c')
-rw-r--r--mm/oom_kill.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index 642f38cb175a..52628c819bf7 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -612,7 +612,8 @@ void oom_kill_process(struct task_struct *p, gfp_t gfp_mask, int order,
612 * Determines whether the kernel must panic because of the panic_on_oom sysctl. 612 * Determines whether the kernel must panic because of the panic_on_oom sysctl.
613 */ 613 */
614void check_panic_on_oom(enum oom_constraint constraint, gfp_t gfp_mask, 614void check_panic_on_oom(enum oom_constraint constraint, gfp_t gfp_mask,
615 int order, const nodemask_t *nodemask) 615 int order, const nodemask_t *nodemask,
616 struct mem_cgroup *memcg)
616{ 617{
617 if (likely(!sysctl_panic_on_oom)) 618 if (likely(!sysctl_panic_on_oom))
618 return; 619 return;
@@ -625,7 +626,7 @@ void check_panic_on_oom(enum oom_constraint constraint, gfp_t gfp_mask,
625 if (constraint != CONSTRAINT_NONE) 626 if (constraint != CONSTRAINT_NONE)
626 return; 627 return;
627 } 628 }
628 dump_header(NULL, gfp_mask, order, NULL, nodemask); 629 dump_header(NULL, gfp_mask, order, memcg, nodemask);
629 panic("Out of memory: %s panic_on_oom is enabled\n", 630 panic("Out of memory: %s panic_on_oom is enabled\n",
630 sysctl_panic_on_oom == 2 ? "compulsory" : "system-wide"); 631 sysctl_panic_on_oom == 2 ? "compulsory" : "system-wide");
631} 632}
@@ -740,7 +741,7 @@ static void __out_of_memory(struct zonelist *zonelist, gfp_t gfp_mask,
740 constraint = constrained_alloc(zonelist, gfp_mask, nodemask, 741 constraint = constrained_alloc(zonelist, gfp_mask, nodemask,
741 &totalpages); 742 &totalpages);
742 mpol_mask = (constraint == CONSTRAINT_MEMORY_POLICY) ? nodemask : NULL; 743 mpol_mask = (constraint == CONSTRAINT_MEMORY_POLICY) ? nodemask : NULL;
743 check_panic_on_oom(constraint, gfp_mask, order, mpol_mask); 744 check_panic_on_oom(constraint, gfp_mask, order, mpol_mask, NULL);
744 745
745 if (sysctl_oom_kill_allocating_task && current->mm && 746 if (sysctl_oom_kill_allocating_task && current->mm &&
746 !oom_unkillable_task(current, NULL, nodemask) && 747 !oom_unkillable_task(current, NULL, nodemask) &&