Re: linux-2.4.27 released
From: William Lee Irwin III
Date: Thu Aug 12 2004 - 13:23:08 EST
On Thu, Aug 12, 2004 at 11:17:12AM -0700, William Lee Irwin III wrote:
> This patch by nature corrects two apparent bugs which are really one
> bug. p->mm can become NULL while traversing the tasklist. The two
> effects are first that kernel threads appear to be killed. The second
> is that the OOM killing process fails to actually shoot down all threads
> of the chosen process, and so fails to reclaim the memory it intended to.
> oom_kill_task() consists primarily of the expansion of the 2.6 inline
> function get_task_mm().
Incremental atop the mm reference patch:
out_of_memory() attempts to determine whether one jiffies-valued
variable refers to a point in time preceding another jiffies-valued
variable, but does not do so in a jiffies wrap -safe fashion. The
following patch corrects this by using the expansion of the 2.6
macro time_after() to check this condition.
Index: linux-2.4/mm/oom_kill.c
===================================================================
--- linux-2.4.orig/mm/oom_kill.c 2004-06-23 19:41:08.000000000 -0700
+++ linux-2.4/mm/oom_kill.c 2004-06-23 19:50:59.000000000 -0700
@@ -289,7 +289,7 @@
spin_lock(&oom_lock);
reset:
- if (first < now)
+ if ((long)first - (long)now < 0)
first = now;
count = 0;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/