Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F106099154
D21767.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
D21767.diff
View Options
Index: head/sys/kern/kern_exec.c
===================================================================
--- head/sys/kern/kern_exec.c
+++ head/sys/kern/kern_exec.c
@@ -981,8 +981,10 @@
if (ma[0]->valid != VM_PAGE_BITS_ALL) {
vm_page_xbusy(ma[0]);
if (!vm_pager_has_page(object, 0, NULL, &after)) {
- vm_page_unwire_noq(ma[0]);
- vm_page_free(ma[0]);
+ if (vm_page_unwire_noq(ma[0]))
+ vm_page_free(ma[0]);
+ else
+ vm_page_xunbusy(ma[0]);
VM_OBJECT_WUNLOCK(object);
return (EIO);
}
@@ -1006,9 +1008,16 @@
initial_pagein = i;
rv = vm_pager_get_pages(object, ma, initial_pagein, NULL, NULL);
if (rv != VM_PAGER_OK) {
- vm_page_unwire_noq(ma[0]);
- for (i = 0; i < initial_pagein; i++)
- vm_page_free(ma[i]);
+ if (vm_page_unwire_noq(ma[0]))
+ vm_page_free(ma[0]);
+ else
+ vm_page_xunbusy(ma[0]);
+ for (i = 1; i < initial_pagein; i++) {
+ if (!vm_page_wired(ma[i]))
+ vm_page_free(ma[i]);
+ else
+ vm_page_xunbusy(ma[i]);
+ }
VM_OBJECT_WUNLOCK(object);
return (EIO);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 26, 9:31 AM (11 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15603372
Default Alt Text
D21767.diff (1 KB)
Attached To
Mode
D21767: Fix handling of page wirings exec_map_first_page().
Attached
Detach File
Event Timeline
Log In to Comment