Bug 5458 - page fault in proc0_init() & fix
Summary: page fault in proc0_init() & fix
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 3.0-CURRENT
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 1998-01-08 22:33 UTC by Luoqi Chen
Modified: 1998-04-11 18:24 UTC (History)
0 users

See Also:


Attachments
file.diff (640 bytes, patch)
1998-01-08 22:33 UTC, Luoqi Chen
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Luoqi Chen 1998-01-08 22:33:17 UTC
	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.
Comment 1 Poul-Henning Kamp freebsd_committer freebsd_triage 1998-04-11 18:24:17 UTC
State Changed
From-To: open->closed

committed, thanks!