mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 08:36:12 -04:00
mm: oom: wait for exit of killed current task
Current task in OOM path could be holding enough memory that is not reapable by oom reaper. Fail the allocation and let the task exit before triggering OOM. Change-Id: Ie00911548c5b16a430767f0b60761d839fc43f78 Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
This commit is contained in:
parent
fa43b983dd
commit
763b4d11af
1 changed files with 4 additions and 0 deletions
|
|
@ -1160,6 +1160,10 @@ bool out_of_memory(struct oom_control *oc)
|
|||
CONFIG_OOM_TASK_PRIORITY_ADJ_LIMIT);
|
||||
oc->min_kill_adj = prev_min_kill_adj;
|
||||
oc->chosen_points = 0;
|
||||
if (tsk_is_oom_victim(current)) {
|
||||
pr_warn_ratelimited("current killed, retry\n");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue