Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F167610365
D32090.id95704.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1005 B
Referenced Files
None
Subscribers
None
D32090.id95704.diff
View Options
Index: sys/compat/linuxkpi/common/src/linux_page.c
===================================================================
--- sys/compat/linuxkpi/common/src/linux_page.c
+++ sys/compat/linuxkpi/common/src/linux_page.c
@@ -281,6 +281,7 @@
unsigned long pfn, pgprot_t prot)
{
vm_object_t vm_obj = vma->vm_obj;
+ vm_object_t tmp_obj;
vm_page_t page;
vm_pindex_t pindex;
@@ -296,6 +297,20 @@
page = PHYS_TO_VM_PAGE(IDX_TO_OFF(pfn));
if (!vm_page_busy_acquire(page, VM_ALLOC_WAITFAIL))
goto retry;
+ if (page->object != NULL) {
+ tmp_obj = page->object;
+ vm_page_xunbusy(page);
+ VM_OBJECT_WUNLOCK(vm_obj);
+ VM_OBJECT_WLOCK(tmp_obj);
+ if (vm_page_busy_acquire(page, VM_ALLOC_WAITFAIL) &&
+ page->object == tmp_obj) {
+ vm_pager_page_unswapped(page);
+ vm_page_remove(page);
+ }
+ VM_OBJECT_WUNLOCK(tmp_obj);
+ VM_OBJECT_WLOCK(vm_obj);
+ goto retry;
+ }
if (vm_page_insert(page, vm_obj, pindex)) {
vm_page_xunbusy(page);
return (VM_FAULT_OOM);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Aug 24, 3:09 AM (5 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37171858
Default Alt Text
D32090.id95704.diff (1005 B)
Attached To
Mode
D32090: LinuxKPI: Allow cdev_pager prefault handler to steal pages from other vm_objects
Attached
Detach File
Event Timeline
Log In to Comment