Passing "0" or "FALSE" as the fourth argument to vm_fault is wrong. It

should be "VM_FAULT_NORMAL".
This commit is contained in:
Alan Cox 1999-11-09 01:44:28 +00:00
parent fc67908fe8
commit b561683329
6 changed files with 23 additions and 16 deletions

View File

@ -439,7 +439,8 @@ trap(a0, a1, a2, entry, framep)
/* Fault in the user page: */
rv = vm_fault(map, va, ftype,
(ftype & VM_PROT_WRITE)
? VM_FAULT_DIRTY : 0);
? VM_FAULT_DIRTY
: VM_FAULT_NORMAL);
--p->p_lock;
} else {
@ -447,7 +448,7 @@ trap(a0, a1, a2, entry, framep)
* Don't have to worry about process
* locking or stacks in the kernel.
*/
rv = vm_fault(map, va, ftype, FALSE);
rv = vm_fault(map, va, ftype, VM_FAULT_NORMAL);
}
nogo:;

View File

@ -664,7 +664,8 @@ trap_pfault(frame, usermode, eva)
/* Fault in the user page: */
rv = vm_fault(map, va, ftype,
(ftype & VM_PROT_WRITE) ? VM_FAULT_DIRTY : 0);
(ftype & VM_PROT_WRITE) ? VM_FAULT_DIRTY
: VM_FAULT_NORMAL);
--p->p_lock;
} else {
@ -679,7 +680,7 @@ trap_pfault(frame, usermode, eva)
* always have pte pages mapped, we just have to fault
* the page.
*/
rv = vm_fault(kernel_map, va, ftype, FALSE);
rv = vm_fault(kernel_map, va, ftype, VM_FAULT_NORMAL);
}
if (rv == KERN_SUCCESS)
@ -778,14 +779,15 @@ trap_pfault(frame, usermode, eva)
/* Fault in the user page: */
rv = vm_fault(map, va, ftype,
(ftype & VM_PROT_WRITE) ? VM_FAULT_DIRTY : 0);
(ftype & VM_PROT_WRITE) ? VM_FAULT_DIRTY
: VM_FAULT_NORMAL);
--p->p_lock;
} else {
/*
* Don't have to worry about process locking or stacks in the kernel.
*/
rv = vm_fault(map, va, ftype, FALSE);
rv = vm_fault(map, va, ftype, VM_FAULT_NORMAL);
}
if (rv == KERN_SUCCESS)

View File

@ -172,7 +172,7 @@ procfs_rwmem(curp, p, uio)
/*
* Fault the page on behalf of the process
*/
error = vm_fault(map, pageno, reqprot, FALSE);
error = vm_fault(map, pageno, reqprot, VM_FAULT_NORMAL);
if (error) {
error = EFAULT;
break;

View File

@ -664,7 +664,8 @@ trap_pfault(frame, usermode, eva)
/* Fault in the user page: */
rv = vm_fault(map, va, ftype,
(ftype & VM_PROT_WRITE) ? VM_FAULT_DIRTY : 0);
(ftype & VM_PROT_WRITE) ? VM_FAULT_DIRTY
: VM_FAULT_NORMAL);
--p->p_lock;
} else {
@ -679,7 +680,7 @@ trap_pfault(frame, usermode, eva)
* always have pte pages mapped, we just have to fault
* the page.
*/
rv = vm_fault(kernel_map, va, ftype, FALSE);
rv = vm_fault(kernel_map, va, ftype, VM_FAULT_NORMAL);
}
if (rv == KERN_SUCCESS)
@ -778,14 +779,15 @@ trap_pfault(frame, usermode, eva)
/* Fault in the user page: */
rv = vm_fault(map, va, ftype,
(ftype & VM_PROT_WRITE) ? VM_FAULT_DIRTY : 0);
(ftype & VM_PROT_WRITE) ? VM_FAULT_DIRTY
: VM_FAULT_NORMAL);
--p->p_lock;
} else {
/*
* Don't have to worry about process locking or stacks in the kernel.
*/
rv = vm_fault(map, va, ftype, FALSE);
rv = vm_fault(map, va, ftype, VM_FAULT_NORMAL);
}
if (rv == KERN_SUCCESS)

View File

@ -664,7 +664,8 @@ trap_pfault(frame, usermode, eva)
/* Fault in the user page: */
rv = vm_fault(map, va, ftype,
(ftype & VM_PROT_WRITE) ? VM_FAULT_DIRTY : 0);
(ftype & VM_PROT_WRITE) ? VM_FAULT_DIRTY
: VM_FAULT_NORMAL);
--p->p_lock;
} else {
@ -679,7 +680,7 @@ trap_pfault(frame, usermode, eva)
* always have pte pages mapped, we just have to fault
* the page.
*/
rv = vm_fault(kernel_map, va, ftype, FALSE);
rv = vm_fault(kernel_map, va, ftype, VM_FAULT_NORMAL);
}
if (rv == KERN_SUCCESS)
@ -778,14 +779,15 @@ trap_pfault(frame, usermode, eva)
/* Fault in the user page: */
rv = vm_fault(map, va, ftype,
(ftype & VM_PROT_WRITE) ? VM_FAULT_DIRTY : 0);
(ftype & VM_PROT_WRITE) ? VM_FAULT_DIRTY
: VM_FAULT_NORMAL);
--p->p_lock;
} else {
/*
* Don't have to worry about process locking or stacks in the kernel.
*/
rv = vm_fault(map, va, ftype, FALSE);
rv = vm_fault(map, va, ftype, VM_FAULT_NORMAL);
}
if (rv == KERN_SUCCESS)

View File

@ -172,7 +172,7 @@ procfs_rwmem(curp, p, uio)
/*
* Fault the page on behalf of the process
*/
error = vm_fault(map, pageno, reqprot, FALSE);
error = vm_fault(map, pageno, reqprot, VM_FAULT_NORMAL);
if (error) {
error = EFAULT;
break;