summaryrefslogtreecommitdiff
path: root/sys/ddb
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2017-05-11 00:42:06 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2017-05-11 00:42:06 +0000
commit6121d88afc791b6530ebf00613a5c001afe54f8a (patch)
treecf4b02c8c11bc19f0812c39b4b919dbfdf3a2535 /sys/ddb
parent0843714eb3319e0d62022966c0337deea0ed1f6b (diff)
reorder uvm init to avoid use before initialisation.
the particular use before init was in uvm_init step 6, which calls kmeminit to set up malloc(9), which calls uvm_km_zalloc, which calls pmap_enter, which calls pool_get, which tries to allocate a page using km_alloc, which isnt initalised until step 9 in uvm_init. uvm_km_page_init calls kthread_create though, which uses malloc internally, so it cant be reordered before malloc init. to cope with this, uvm_km_page_init is split up. it sets up the subsystem, and is called before kmeminit. the thread init is moved to uvm_km_page_lateinit, which is called after kmeminit in uvm_init.
Diffstat (limited to 'sys/ddb')
0 files changed, 0 insertions, 0 deletions