summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>1999-11-09 01:44:28 +0000
committeralc <alc@FreeBSD.org>1999-11-09 01:44:28 +0000
commit49c5eada3d9e771ead85ec20a2ccdae9982417af (patch)
treebfa7411e917dde2dc2cafd7795c0248368e9cbb2 /sys
parent92e43b67476e9898be13ca7cf6d1a35f5f5b1721 (diff)
downloadFreeBSD-src-49c5eada3d9e771ead85ec20a2ccdae9982417af.zip
FreeBSD-src-49c5eada3d9e771ead85ec20a2ccdae9982417af.tar.gz
Passing "0" or "FALSE" as the fourth argument to vm_fault is wrong. It
should be "VM_FAULT_NORMAL".
Diffstat (limited to 'sys')
-rw-r--r--sys/alpha/alpha/trap.c5
-rw-r--r--sys/amd64/amd64/trap.c10
-rw-r--r--sys/fs/procfs/procfs_mem.c2
-rw-r--r--sys/i386/i386/trap.c10
-rw-r--r--sys/kern/subr_trap.c10
-rw-r--r--sys/miscfs/procfs/procfs_mem.c2
6 files changed, 23 insertions, 16 deletions
diff --git a/sys/alpha/alpha/trap.c b/sys/alpha/alpha/trap.c
index 06e5b24..1924ddd 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 4d48110..e1bfac4 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 df97979..963fb3a 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 4d48110..e1bfac4 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 4d48110..e1bfac4 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 df97979..963fb3a 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;
OpenPOWER on IntegriCloud