[PATCH] oom fix: prevent oom from killing a process with children/sibling unkillable
Looking at oom_kill.c, found that the intention to not kill the selected process if any of its children/siblings has OOM_DISABLE set, is not being met. Signed-off-by: Ankita Garg <ankita@in.ibm.com> Acked-by: Nick Piggin <npiggin@suse.de> Acked-by: William Irwin <wli@holomorphy.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
e5d480ff17
commit
35ae834fa0
1 changed files with 1 additions and 1 deletions
|
@ -320,7 +320,7 @@ static int oom_kill_task(struct task_struct *p)
|
||||||
* Don't kill the process if any threads are set to OOM_DISABLE
|
* Don't kill the process if any threads are set to OOM_DISABLE
|
||||||
*/
|
*/
|
||||||
do_each_thread(g, q) {
|
do_each_thread(g, q) {
|
||||||
if (q->mm == mm && p->oomkilladj == OOM_DISABLE)
|
if (q->mm == mm && q->oomkilladj == OOM_DISABLE)
|
||||||
return 1;
|
return 1;
|
||||||
} while_each_thread(g, q);
|
} while_each_thread(g, q);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue