diff options
author | kib <kib@FreeBSD.org> | 2007-10-08 20:09:53 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2007-10-08 20:09:53 +0000 |
commit | 53bbfe99fba4968859487121a0b32eb29424d31c (patch) | |
tree | 64badd8038f8d7a8a5ea95aefb81129c6ee9aabb | |
parent | 3c3bd88cdf6a99e63cca4d3e883e1c75f3639deb (diff) | |
download | FreeBSD-src-53bbfe99fba4968859487121a0b32eb29424d31c.zip FreeBSD-src-53bbfe99fba4968859487121a0b32eb29424d31c.tar.gz |
Do not dereference NULL pointer.
Reported by: Peter Holm
Reviewed by: alc
Approved by: re (kensmith)
-rw-r--r-- | sys/vm/vm_fault.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index b26972e..49a4077 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -431,14 +431,13 @@ RetryFault:; if (!vm_page_count_severe()) { fs.m = vm_page_alloc(fs.object, fs.pindex, (fs.vp || fs.object->backing_object)? VM_ALLOC_NORMAL: VM_ALLOC_ZERO); - if ((fs.m->valid & VM_PAGE_BITS_ALL) == VM_PAGE_BITS_ALL) - break; } if (fs.m == NULL) { unlock_and_deallocate(&fs); VM_WAITPFAULT; goto RetryFault; - } + } else if ((fs.m->valid & VM_PAGE_BITS_ALL) == VM_PAGE_BITS_ALL) + break; } readrest: |