Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F174199103
D38527.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D38527.diff
View Options
diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c
--- a/sys/vm/vm_fault.c
+++ b/sys/vm/vm_fault.c
@@ -338,20 +338,16 @@
#endif
int psind;
vm_offset_t vaddr;
- enum fault_status res;
MPASS(fs->vp == NULL);
- res = FAULT_SUCCESS;
vaddr = fs->vaddr;
vm_object_busy(fs->first_object);
m = vm_page_lookup(fs->first_object, fs->first_pindex);
/* A busy page can be mapped for read|execute access. */
if (m == NULL || ((fs->prot & VM_PROT_WRITE) != 0 &&
- vm_page_busied(m)) || !vm_page_all_valid(m)) {
- res = FAULT_FAILURE;
- goto out;
- }
+ vm_page_busied(m)) || !vm_page_all_valid(m))
+ goto fail;
m_map = m;
psind = 0;
#if VM_NRESERVLEVEL > 0
@@ -386,10 +382,8 @@
#endif
if (pmap_enter(fs->map->pmap, vaddr, m_map, fs->prot, fs->fault_type |
PMAP_ENTER_NOSLEEP | (fs->wired ? PMAP_ENTER_WIRED : 0), psind) !=
- KERN_SUCCESS) {
- res = FAULT_FAILURE;
- goto out;
- }
+ KERN_SUCCESS)
+ goto fail;
if (fs->m_hold != NULL) {
(*fs->m_hold) = m;
vm_page_wire(m);
@@ -398,12 +392,13 @@
vm_fault_prefault(fs, vaddr, PFBAK, PFFOR, true);
VM_OBJECT_RUNLOCK(fs->first_object);
vm_fault_dirty(fs, m);
+ vm_object_unbusy(fs->first_object);
vm_map_lookup_done(fs->map, fs->entry);
curthread->td_ru.ru_minflt++;
-
-out:
+ return (FAULT_SUCCESS);
+fail:
vm_object_unbusy(fs->first_object);
- return (res);
+ return (FAULT_FAILURE);
}
static void
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Oct 2, 7:48 AM (15 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40026476
Default Alt Text
D38527.diff (1 KB)
Attached To
Mode
D38527: vm_fault: Fix a race in vm_fault_soft_fast()
Attached
Detach File
Event Timeline
Log In to Comment