Subject: bug alert: pmap.c - m68k
To: None <tech-kern@NetBSD.ORG>
From: Leo Weppelman <>
List: tech-kern
Date: 04/17/1996 09:52:17
I have seen a couple of kernel panics lately that all originated from
pmap_remove. The trouble is the check if the segment table of the
current process is changed. It turns out that in a considerable number
of cases, curproc == NULL. As page-zero is a valid page on the atari
(and as far as I know this is true on most m68k-ports), the pointer
to the changed map is compared to something undefined. Occasionally this
test returns true and PMAP_ACTIVATE is called with a bogus pcb.

The solution seems quite simple: check if curproc is a NULL-pointer....
However, there are more references to curproc and this made me wonder if
curproc being NULL is an error in itself. I can't judge this myself because
my knowledge of the vm-system is limited and I hope to find some on this
list ;-)

Another interesting point is: is it possible to make page-zero invalid.
I haven't investigated this very thoroughly yet, but I think it's possible.
This has the advantage of catching this kind of bugs earlier.