kernel - Fix overflows and races in zalloc()
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 12 Nov 2011 16:51:18 +0000 (08:51 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 12 Nov 2011 16:51:18 +0000 (08:51 -0800)
commit65622d85922eb51fe098fef2323a0bdb2ac7dee8
tree95975b7a99020d90ee6b83cbc76512f8aff256a0
parent18af8f55e0030722b15761e79680829d44124a18
kernel - Fix overflows and races in zalloc()

* Fix a 32 bit overflow which would crash machines with large amounts of
  ram once the number of PV entries (in bytes) exceeds the 2GB mark.

* Refactor the page allocation to allow vm_page_alloc() and friends to block.

* Don't depend on being unqueued, wire the related pages.
sys/vm/vm_zone.c