Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177263259
D18606.1794029170.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D18606.1794029170.diff
View Options
Index: head/sys/compat/linuxkpi/common/include/linux/mm.h
===================================================================
--- head/sys/compat/linuxkpi/common/include/linux/mm.h
+++ head/sys/compat/linuxkpi/common/include/linux/mm.h
@@ -180,12 +180,8 @@
return (-ENOTSUP);
}
-static inline int
-zap_vma_ptes(struct vm_area_struct *vma, unsigned long address,
- unsigned long size)
-{
- return (-ENOTSUP);
-}
+int zap_vma_ptes(struct vm_area_struct *vma, unsigned long address,
+ unsigned long size);
static inline int
remap_pfn_range(struct vm_area_struct *vma, unsigned long addr,
Index: head/sys/compat/linuxkpi/common/src/linux_compat.c
===================================================================
--- head/sys/compat/linuxkpi/common/src/linux_compat.c
+++ head/sys/compat/linuxkpi/common/src/linux_compat.c
@@ -672,6 +672,25 @@
},
};
+int
+zap_vma_ptes(struct vm_area_struct *vma, unsigned long address,
+ unsigned long size)
+{
+ vm_object_t obj;
+ vm_page_t m;
+
+ obj = vma->vm_obj;
+ if (obj == NULL || (obj->flags & OBJ_UNMANAGED) != 0)
+ return (-ENOTSUP);
+ VM_OBJECT_RLOCK(obj);
+ for (m = vm_page_find_least(obj, OFF_TO_IDX(address));
+ m != NULL && m->pindex < OFF_TO_IDX(address + size);
+ m = TAILQ_NEXT(m, listq))
+ pmap_remove_all(m);
+ VM_OBJECT_RUNLOCK(obj);
+ return (0);
+}
+
#define OPW(fp,td,code) ({ \
struct file *__fpop; \
__typeof(code) __retval; \
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 7, 5:26 AM (18 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41541817
Default Alt Text
D18606.1794029170.diff (1 KB)
Attached To
Mode
D18606: Fix linux_destroy_dev() behaviour when there are still files open from the destroying cdev.
Attached
Detach File
Event Timeline