Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F162604526
D58194.id181842.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
D58194.id181842.diff
View Options
Index: sys/compat/linuxkpi/common/src/linux_compat.c
===================================================================
--- sys/compat/linuxkpi/common/src/linux_compat.c
+++ sys/compat/linuxkpi/common/src/linux_compat.c
@@ -553,6 +553,8 @@
*/
*first = vmap->vm_pfn_first;
*last = *first + vmap->vm_pfn_count - 1;
+ MPASS(pidx >= *first);
+ MPASS(pidx <= *last);
err = VM_PAGER_OK;
break;
default:
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
@@ -515,12 +515,15 @@
vm_page_t page;
vm_pindex_t pindex;
+ if (addr < vma->vm_start || addr >= vma->vm_end)
+ return (VM_FAULT_SIGBUS);
+
VM_OBJECT_ASSERT_WLOCKED(vm_obj);
vm_page_iter_init(&pages, vm_obj);
pindex = OFF_TO_IDX(addr - vma->vm_start);
if (vma->vm_pfn_count == 0)
vma->vm_pfn_first = pindex;
- MPASS(pindex <= OFF_TO_IDX(vma->vm_end));
+ MPASS(pindex < OFF_TO_IDX(vma->vm_end));
retry:
page = vm_page_grab_iter(vm_obj, pindex, VM_ALLOC_NOCREAT, &pages);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jul 15, 11:28 PM (9 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35118620
Default Alt Text
D58194.id181842.diff (1 KB)
Attached To
Mode
D58194: linuxkpi: Fix assertion in `lkpi_vmf_insert_pfn_prot_locked()`
Attached
Detach File
Event Timeline
Log In to Comment