Re: PROBLEM SOLVED: System halt/oops during during first login after

William Stearns (wstearns@pobox.com)
Tue, 20 Jul 1999 22:59:11 -0400 (EDT)


On Tue, 20 Jul 1999, William Stearns wrote:

[snip]
> The oops in /var/log/messages was truncated. Here's all I have:
> Jul 20 12:28:46 sparrow kernel: Unable to handle kernel NULL pointer dereference at virtual address 00000064
> Jul 20 12:28:46 sparrow kernel: printing eip:
> Jul 20 12:28:46 sparrow kernel: c0122f73
> Jul 20 12:28:46 sparrow kernel: current->thread.cr3 = 00cfa000, %cr3 = 00cfa000
> Jul 20 12:28:46 sparrow kernel: *pde = 00000000
> Jul 20 12:28:46 sparrow kernel: Oops: 0000
> Jul 20 12:28:46 sparrow kernel: CPU: 0
> Jul 20 12:28:46 sparrow kernel: EIP: 0010:[swap_out+95/220]
[snip]

Mikael's one line fix, applied to 2.3.11-pre6 has allowed me to
boot without oops successfully. No problems after a half-hour of moderate
use.
Patch attached below for reference. Thanks, Mikael!
Cheers,
-Bill

Subject: fix for 2.3.11-pre6 swap_out() oops
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)

---------------------------------------------------------------------------
"The idea that Bill Gates has appeared like a knight in shining
armour to lead all customers out of a mire of technological chaos neatly
ignores the fact that it was he who, by peddling second-rate technology,
led them into it in the first place."
- Douglas Adams, on Windows '95.
(Courtesy of David Rysdam <drysdam@az.com>)
--------------------------------------------------------------------------
William Stearns (wstearns@pobox.com). Mason, Buildkernel, named2hosts,
and ipfwadm2ipchains are at: http://www.pobox.com/~wstearns/
--------------------------------------------------------------------------

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