diff options
author | Renato Botelho <renato@netgate.com> | 2016-11-02 10:47:46 -0200 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2016-11-02 10:47:46 -0200 |
commit | 01e4dee209c13f5a3343e3cc887c2f920a69dd65 (patch) | |
tree | b19966b3c263495a3f07f891adba668c508ba31b /sys/vm/vm_fault.c | |
parent | 5fc1b195c4ab71aaf651429b2c50ee5cc5e7c5fb (diff) | |
parent | 2f81d935658287026e614a5edf74ae47f5c54f3f (diff) | |
download | FreeBSD-src-RELENG_2_3_2.zip FreeBSD-src-RELENG_2_3_2.tar.gz |
Merge remote-tracking branch 'origin/releng/10.3' into RELENG_2_3_2RELENG_2_3_2
Diffstat (limited to 'sys/vm/vm_fault.c')
-rw-r--r-- | sys/vm/vm_fault.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c index b5ac58f..d65cda2 100644 --- a/sys/vm/vm_fault.c +++ b/sys/vm/vm_fault.c @@ -286,7 +286,7 @@ vm_fault_hold(vm_map_t map, vm_offset_t vaddr, vm_prot_t fault_type, vm_prot_t prot; long ahead, behind; int alloc_req, era, faultcount, nera, reqpage, result; - boolean_t growstack, is_first_object_locked, wired; + boolean_t dead, growstack, is_first_object_locked, wired; int map_generation; vm_object_t next_object; vm_page_t marray[VM_FAULT_READ_MAX]; @@ -423,11 +423,18 @@ fast_failed: fs.pindex = fs.first_pindex; while (TRUE) { /* - * If the object is dead, we stop here + * If the object is marked for imminent termination, + * we retry here, since the collapse pass has raced + * with us. Otherwise, if we see terminally dead + * object, return fail. */ - if (fs.object->flags & OBJ_DEAD) { + if ((fs.object->flags & OBJ_DEAD) != 0) { + dead = fs.object->type == OBJT_DEAD; unlock_and_deallocate(&fs); - return (KERN_PROTECTION_FAILURE); + if (dead) + return (KERN_PROTECTION_FAILURE); + pause("vmf_de", 1); + goto RetryFault; } /* |