Re: oom() _still_ killing init

Andrea Arcangeli (andrea@suse.de)
Wed, 16 Jun 1999 21:51:39 +0200 (CEST)


On Wed, 16 Jun 1999, Oliver Xymoron wrote:

>I upgraded from 2.2.5 to 2.2.10-pre-no-way-of-telling-anymore and an out
>of memory condition[1] killed init again. It would be nice if this weren't

Apply this patch:

Index: linux/mm/memory.c
===================================================================
RCS file: /var/cvs/linux/mm/memory.c,v
retrieving revision 1.1.1.4.2.6
diff -u -r1.1.1.4.2.6 memory.c
--- linux/mm/memory.c 1999/06/12 16:18:37 1.1.1.4.2.6
+++ linux/mm/memory.c 1999/06/16 19:48:40
@@ -67,8 +67,11 @@
*/
void oom(struct task_struct * task)
{
+ if (task->pid == 1)
+ goto out;
printk("\nOut of memory for %s.\n", task->comm);
force_sig(SIGKILL, task);
+ out:
}

/*

(it's against 2.2.10_andrea-VM5)

Andrea Arcangeli

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/