|
@@ -303,7 +303,7 @@ static struct task_struct *select_bad_process(unsigned int *ppoints,
|
|
do_each_thread(g, p) {
|
|
do_each_thread(g, p) {
|
|
unsigned int points;
|
|
unsigned int points;
|
|
|
|
|
|
- if (!p->mm)
|
|
|
|
|
|
+ if (p->exit_state)
|
|
continue;
|
|
continue;
|
|
if (oom_unkillable_task(p, mem, nodemask))
|
|
if (oom_unkillable_task(p, mem, nodemask))
|
|
continue;
|
|
continue;
|
|
@@ -319,6 +319,8 @@ static struct task_struct *select_bad_process(unsigned int *ppoints,
|
|
*/
|
|
*/
|
|
if (test_tsk_thread_flag(p, TIF_MEMDIE))
|
|
if (test_tsk_thread_flag(p, TIF_MEMDIE))
|
|
return ERR_PTR(-1UL);
|
|
return ERR_PTR(-1UL);
|
|
|
|
+ if (!p->mm)
|
|
|
|
+ continue;
|
|
|
|
|
|
if (p->flags & PF_EXITING) {
|
|
if (p->flags & PF_EXITING) {
|
|
/*
|
|
/*
|