From 79befd0c08c4766f8fa27e37ac2a70e40840a56a Mon Sep 17 00:00:00 2001 From: Andrea Arcangeli Date: Sat, 16 Apr 2005 15:24:05 -0700 Subject: [PATCH] oom-killer disable for iscsi/lvm2/multipath userland critical sections iscsi/lvm2/multipath needs guaranteed protection from the oom-killer, so make the magical value of -17 in /proc//oom_adj defeat the oom-killer altogether. (akpm: we still need to document oom_adj and friends in Documentation/filesystems/proc.txt!) Signed-off-by: Andrea Arcangeli Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/proc/base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/proc/base.c') diff --git a/fs/proc/base.c b/fs/proc/base.c index dad8ea4e00a..39fd336cfdb 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c @@ -751,7 +751,7 @@ static ssize_t oom_adjust_write(struct file *file, const char __user *buf, if (copy_from_user(buffer, buf, count)) return -EFAULT; oom_adjust = simple_strtol(buffer, &end, 0); - if (oom_adjust < -16 || oom_adjust > 15) + if ((oom_adjust < -16 || oom_adjust > 15) && oom_adjust != OOM_DISABLE) return -EINVAL; if (*end == '\n') end++; -- cgit v1.2.3