summaryrefslogtreecommitdiff
path: root/mm/oom_kill.c
diff options
context:
space:
mode:
authorAnkita Garg <ankita@in.ibm.com>2007-03-16 13:38:33 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-03-16 19:25:06 -0700
commit35ae834fa02ba89cfbd4a80892c0e458fd6d5c0b (patch)
tree37be7d571b1d6b4141f42dcd05a0289df1811d0a /mm/oom_kill.c
parente5d480ff17f9220cd6198b5c91e8c75329f5594f (diff)
downloadlinux-3.10-35ae834fa02ba89cfbd4a80892c0e458fd6d5c0b.tar.gz
linux-3.10-35ae834fa02ba89cfbd4a80892c0e458fd6d5c0b.tar.bz2
linux-3.10-35ae834fa02ba89cfbd4a80892c0e458fd6d5c0b.zip
[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>
Diffstat (limited to 'mm/oom_kill.c')
-rw-r--r--mm/oom_kill.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index b278b8d60ee..2f3916986ab 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -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
*/
do_each_thread(g, q) {
- if (q->mm == mm && p->oomkilladj == OOM_DISABLE)
+ if (q->mm == mm && q->oomkilladj == OOM_DISABLE)
return 1;
} while_each_thread(g, q);