Close two holes in the pmap code. The page table self mapping does not
authorMatthew Dillon <dillon@dragonflybsd.org>
Mon, 15 Jan 2007 09:28:40 +0000 (09:28 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Mon, 15 Jan 2007 09:28:40 +0000 (09:28 +0000)
commit8790d7d8852e6f1030de7979c7db191075191a22
tree98d1de33154a1131d1ce803dc31bd2cfbd3ac3a8
parent9aeb4297f7a985e869dce4d74bdc01c6d9548efe
Close two holes in the pmap code.  The page table self mapping does not
necessarily stay valid through a blocking condition, recheck it for every
page.  The 'next' pointer in the loop that runs through PV entries is not
safe when code blocks in the loop.  Add a generation count to detect
unexpected removals and restart the loop.  Add a kprintf() to print when
the condition is detected.

Crash-Reported-by: Nuno Antunes <bugs@crater.dragonflybsd.org>
sys/platform/pc32/i386/pmap.c
sys/platform/pc32/include/pmap.h
sys/platform/vkernel/include/pmap.h
sys/platform/vkernel/platform/pmap.c