lkml.org 
[lkml]   [2001]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
Subject[PATCH] Prevent OOM from killing init
Since the system will panic if the init process is chosen by
the OOM killer, the following patch prevents select_bad_process()
from picking init.

Pat

--- xxx/linux-2.4.3-pre6/mm/oom_kill.c Tue Nov 14 13:56:46 2000
+++ linux-2.4.3-pre6/mm/oom_kill.c Wed Mar 21 15:25:03 2001
@@ -123,7 +123,7 @@

read_lock(&tasklist_lock);
for_each_task(p) {
- if (p->pid) {
+ if (p->pid && p->pid != 1) {
int points = badness(p);
if (points > maxpoints) {
chosen = p;
--
Patrick O'Rourke
978.606.0236
orourke@missioncriticallinux.com

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

\
 
 \ /
  Last update: 2005-03-22 13:29    [W:1.161 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site