fix for 2.3.11-pre6 swap_out() oops

Mikael Pettersson (mikpe@csd.uu.se)
Tue, 20 Jul 1999 22:19:13 +0200 (MET DST)


2.3.11-pre6 locked up completely on me, shortly after boot.
A task's mm may now be NULL (but only for kernel threads I guess),
but swap_out() didn't know this --> boom! With the patch below,
my 2.3.11-pre6 is rock solid (touch wood).

/Mikael

--- linux-2.3.11-pre6/mm/vmscan.c.~1~ Tue Jul 20 20:14:21 1999
+++ linux-2.3.11-pre6/mm/vmscan.c Tue Jul 20 21:35:45 1999
@@ -354,7 +354,7 @@
for (; p != &init_task; p = p->next_task) {
if (!p->swappable)
continue;
- if (p->mm->rss <= 0)
+ if (!p->mm || p->mm->rss <= 0)
continue;
/* Refresh swap_cnt? */
if (assign)

-
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/