|
Lines 258-272
static struct mm_struct *oom_kill_task(t
Link Here
|
| 258 |
return NULL; |
258 |
return NULL; |
| 259 |
} |
259 |
} |
| 260 |
|
260 |
|
|
|
261 |
/* |
| 262 |
* Don't kill the process if any threads are set to OOM_DISABLE |
| 263 |
*/ |
| 264 |
do_each_thread(g, q) { |
| 265 |
if (q->mm == mm && p->oomkilladj == OOM_DISABLE) { |
| 266 |
mmput(mm); |
| 267 |
return NULL; |
| 268 |
} |
| 269 |
} while_each_thread(g, q); |
| 270 |
|
| 261 |
__oom_kill_task(p, message); |
271 |
__oom_kill_task(p, message); |
|
|
272 |
|
| 262 |
/* |
273 |
/* |
| 263 |
* kill all processes that share the ->mm (i.e. all threads), |
274 |
* kill all processes that share the ->mm (i.e. all threads), |
| 264 |
* but are in a different thread group |
275 |
* but are in a different thread group |
| 265 |
*/ |
276 |
*/ |
| 266 |
do_each_thread(g, q) |
277 |
do_each_thread(g, q) { |
| 267 |
if (q->mm == mm && q->tgid != p->tgid) |
278 |
if (q->mm == mm && q->tgid != p->tgid) |
| 268 |
__oom_kill_task(q, message); |
279 |
__oom_kill_task(q, message); |
| 269 |
while_each_thread(g, q); |
280 |
} while_each_thread(g, q); |
| 270 |
|
281 |
|
| 271 |
return mm; |
282 |
return mm; |
| 272 |
} |
283 |
} |