|
@@ -299,6 +299,8 @@ static struct task_struct *select_bad_process(unsigned int *ppoints,
|
|
|
do_each_thread(g, p) {
|
|
|
unsigned int points;
|
|
|
|
|
|
+ if (!p->mm)
|
|
|
+ continue;
|
|
|
if (oom_unkillable_task(p, mem, nodemask))
|
|
|
continue;
|
|
|
|
|
@@ -324,7 +326,7 @@ static struct task_struct *select_bad_process(unsigned int *ppoints,
|
|
|
* the process of exiting and releasing its resources.
|
|
|
* Otherwise we could get an easy OOM deadlock.
|
|
|
*/
|
|
|
- if ((p->flags & PF_EXITING) && p->mm) {
|
|
|
+ if (p->flags & PF_EXITING) {
|
|
|
if (p != current)
|
|
|
return ERR_PTR(-1UL);
|
|
|
|