summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1994-08-04 19:43:13 +0000
committerdg <dg@FreeBSD.org>1994-08-04 19:43:13 +0000
commit92c719582bba1d40d15d5ee88ae8fb3f6077ebf0 (patch)
tree6684a49278d21f45da6fb537c031b6a03bca60fb /sys
parent89acf22c68f6481b15bd1014cb952af42f759760 (diff)
downloadFreeBSD-src-92c719582bba1d40d15d5ee88ae8fb3f6077ebf0.zip
FreeBSD-src-92c719582bba1d40d15d5ee88ae8fb3f6077ebf0.tar.gz
Fixed bug that would cause free memory reserves to be depleted and cause a
panic in some cases. Submitted by: John Dyson
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/vfs_bio.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index b3e3c07..ff6311e 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -16,7 +16,7 @@
* 4. Modifications may be freely made to this file if the above conditions
* are met.
*
- * $Id$
+ * $Id: vfs_bio.c,v 1.4 1994/08/02 07:43:13 davidg Exp $
*/
#include <sys/param.h>
@@ -673,6 +673,10 @@ vm_hold_load_pages(vm_offset_t froma, vm_offset_t toa) {
vm_offset_t pa;
tryagain:
+ if (cnt.v_free_count <= cnt.v_free_reserved) {
+ VM_WAIT;
+ goto tryagain;
+ }
p = vm_page_alloc(kernel_object, pg - VM_MIN_KERNEL_ADDRESS);
if( !p) {
VM_WAIT;
OpenPOWER on IntegriCloud