From 25703033ca920cff93c8a4ee483e99982bbd6438 Mon Sep 17 00:00:00 2001 From: ade Date: Fri, 21 Oct 2005 19:42:43 +0000 Subject: Specifically panic() in the case where pmap_insert_entry() fails to get a new pv under high system load where the available pv entries have been exhausted before the pagedaemon has a chance to wake up to reclaim some. Prior to this, the NULL pointer dereference ended up causing secondary panics with rather less than useful resulting tracebacks. Reviewed by: alc, jhb MFC after: 1 week --- sys/amd64/amd64/pmap.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sys/amd64') diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 4c188aa..029963a 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -1508,6 +1508,8 @@ pmap_insert_entry(pmap_t pmap, vm_offset_t va, vm_page_t m) pv_entry_t pv; pv = get_pv_entry(); + if (pv == NULL) + panic("no pv entries: increase vm.pmap.shpgperproc"); pv->pv_va = va; pv->pv_pmap = pmap; -- cgit v1.1