mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-12-06 10:49:18 -05:00
oom: oom_kill_process() doesn't select kthread child
Presently select_bad_process() has a PF_KTHREAD check, but oom_kill_process doesn't. It mean oom_kill_process() may choose wrong task, especially, when the child are using use_mm(). Signed-off-by: KOSAKI Motohiro <[email protected]> Reviewed-by: Minchan Kim <[email protected]> Cc: David Rientjes <[email protected]> Cc: KAMEZAWA Hiroyuki <[email protected]> Cc: Oleg Nesterov <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
7c59aec830
commit
2c5ea53ce4
1 changed files with 2 additions and 0 deletions
|
|
@ -467,6 +467,8 @@ static int oom_kill_process(struct task_struct *p, gfp_t gfp_mask, int order,
|
|||
|
||||
if (child->mm == p->mm)
|
||||
continue;
|
||||
if (child->flags & PF_KTHREAD)
|
||||
continue;
|
||||
if (mem && !task_in_mem_cgroup(child, mem))
|
||||
continue;
|
||||
if (!has_intersects_mems_allowed(child, nodemask))
|
||||
|
|
|
|||
Loading…
Reference in a new issue