diff options
author | ade <ade@FreeBSD.org> | 2005-10-21 19:42:43 +0000 |
---|---|---|
committer | ade <ade@FreeBSD.org> | 2005-10-21 19:42:43 +0000 |
commit | 25703033ca920cff93c8a4ee483e99982bbd6438 (patch) | |
tree | c2e89996135a257cc2b5a7bb932fa7c5ffc23491 /sys/amd64 | |
parent | f2b9dccde579b1e5cf7fdc652bafb3cff92e2b87 (diff) | |
download | FreeBSD-src-25703033ca920cff93c8a4ee483e99982bbd6438.zip FreeBSD-src-25703033ca920cff93c8a4ee483e99982bbd6438.tar.gz |
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
Diffstat (limited to 'sys/amd64')
-rw-r--r-- | sys/amd64/amd64/pmap.c | 2 |
1 files changed, 2 insertions, 0 deletions
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; |