When pmap_pinit0() allocates a page for proc0's page directory, kernal page table may need to be extended. But while growing the kernel page table (pmap_growkernel()), newly allocated kernel page table pages are entered into every process' page directory. For proc0, the page directory is not allocated yet, and results in a page fault. Eventually, the machine panics with "lockmgr: not holding exclusive lock". Fix: In init_main.c:proc0_init(), move the call to pmap_pinit0() two lines up, right before proc0->p_vmspace is set. Because vmspace is not set, proc0 will be skipped when growing kernel page table. How-To-Repeat: Not sure.
State Changed From-To: open->closed committed, thanks!