summaryrefslogtreecommitdiff
path: root/vm
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1999-09-04 13:03:32 +0000
committerThomas Bushnell <thomas@gnu.org>1999-09-04 13:03:32 +0000
commitb785e79ae365d241801e6fd5d8e6de490c4b1e8c (patch)
tree21243ca3eed8e432b571c62fd97ae16aecf57c1b /vm
parentc2826ce48e02c105163625532fd843c3c0c08108 (diff)
1999-09-04 Thomas Bushnell, BSG <tb@mit.edu>
* vm/vm_resident.c (vm_page_grab): Only block unprivileged allocations over vm_page_external_limit if they are actually external allocations. Reported by Mark Kettenis (kettenis@wins.uva.nl>.
Diffstat (limited to 'vm')
-rw-r--r--vm/vm_resident.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/vm/vm_resident.c b/vm/vm_resident.c
index f9441ad..4ab39f4 100644
--- a/vm/vm_resident.c
+++ b/vm/vm_resident.c
@@ -859,9 +859,10 @@ vm_page_t vm_page_grab(
* for externally-managed pages.
*/
- if (((vm_page_free_count < vm_page_free_reserved) ||
- (vm_page_external_count > vm_page_external_limit)) &&
- !current_thread()->vm_privilege) {
+ if (((vm_page_free_count < vm_page_free_reserved)
+ || (external
+ && (vm_page_external_count > vm_page_external_limit)))
+ && !current_thread()->vm_privilege) {
simple_unlock(&vm_page_queue_free_lock);
return VM_PAGE_NULL;
}