Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F140660942
D21992.id63207.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
D21992.id63207.diff
View Options
Index: head/sys/vm/vm_fault.c
===================================================================
--- head/sys/vm/vm_fault.c
+++ head/sys/vm/vm_fault.c
@@ -554,15 +554,11 @@
vm_fault_trap(vm_map_t map, vm_offset_t vaddr, vm_prot_t fault_type,
int fault_flags, int *signo, int *ucode)
{
- struct thread *td;
int result;
MPASS(signo == NULL || ucode != NULL);
- td = curthread;
- if ((td->td_pflags & TDP_NOFAULTING) != 0)
- return (KERN_PROTECTION_FAILURE);
#ifdef KTRACE
- if (map != kernel_map && KTRPOINT(td, KTR_FAULT))
+ if (map != kernel_map && KTRPOINT(curthread, KTR_FAULT))
ktrfault(vaddr, fault_type);
#endif
result = vm_fault(map, trunc_page(vaddr), fault_type, fault_flags,
@@ -574,7 +570,7 @@
result == KERN_OUT_OF_BOUNDS,
("Unexpected Mach error %d from vm_fault()", result));
#ifdef KTRACE
- if (map != kernel_map && KTRPOINT(td, KTR_FAULTEND))
+ if (map != kernel_map && KTRPOINT(curthread, KTR_FAULTEND))
ktrfaultend(result);
#endif
if (result != KERN_SUCCESS && signo != NULL) {
@@ -644,6 +640,10 @@
bool dead, hardfault, is_first_object_locked;
VM_CNT_INC(v_vm_faults);
+
+ if ((curthread->td_pflags & TDP_NOFAULTING) != 0)
+ return (KERN_PROTECTION_FAILURE);
+
fs.vp = NULL;
faultcount = 0;
nera = -1;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 27, 1:44 PM (7 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27306150
Default Alt Text
D21992.id63207.diff (1 KB)
Attached To
Mode
D21992: Restore nofaulting operations after r352807
Attached
Detach File
Event Timeline
Log In to Comment