From 49c5eada3d9e771ead85ec20a2ccdae9982417af Mon Sep 17 00:00:00 2001 From: alc Date: Tue, 9 Nov 1999 01:44:28 +0000 Subject: [PATCH] Passing "0" or "FALSE" as the fourth argument to vm_fault is wrong. It should be "VM_FAULT_NORMAL". --- sys/alpha/alpha/trap.c | 5 +++-- sys/amd64/amd64/trap.c | 10 ++++++---- sys/fs/procfs/procfs_mem.c | 2 +- sys/i386/i386/trap.c | 10 ++++++---- sys/kern/subr_trap.c | 10 ++++++---- sys/miscfs/procfs/procfs_mem.c | 2 +- 6 files changed, 23 insertions(+), 16 deletions(-) diff --git a/sys/alpha/alpha/trap.c b/sys/alpha/alpha/trap.c index 06e5b24b9f70..1924ddd39b70 100644 --- a/sys/alpha/alpha/trap.c +++ b/sys/alpha/alpha/trap.c @@ -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:; diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c index 4d48110e2c95..e1bfac496b66 100644 --- a/sys/amd64/amd64/trap.c +++ b/sys/amd64/amd64/trap.c @@ -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) diff --git a/sys/fs/procfs/procfs_mem.c b/sys/fs/procfs/procfs_mem.c index df97979fdfd3..963fb3a22cdf 100644 --- a/sys/fs/procfs/procfs_mem.c +++ b/sys/fs/procfs/procfs_mem.c @@ -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; diff --git a/sys/i386/i386/trap.c b/sys/i386/i386/trap.c index 4d48110e2c95..e1bfac496b66 100644 --- a/sys/i386/i386/trap.c +++ b/sys/i386/i386/trap.c @@ -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) diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c index 4d48110e2c95..e1bfac496b66 100644 --- a/sys/kern/subr_trap.c +++ b/sys/kern/subr_trap.c @@ -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) diff --git a/sys/miscfs/procfs/procfs_mem.c b/sys/miscfs/procfs/procfs_mem.c index df97979fdfd3..963fb3a22cdf 100644 --- a/sys/miscfs/procfs/procfs_mem.c +++ b/sys/miscfs/procfs/procfs_mem.c @@ -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;