summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/alpha/alpha/vm_machdep.c8
-rw-r--r--sys/amd64/amd64/vm_machdep.c9
-rw-r--r--sys/i386/i386/vm_machdep.c9
-rw-r--r--sys/kern/sys_pipe.c5
-rw-r--r--sys/powerpc/aim/vm_machdep.c8
-rw-r--r--sys/powerpc/powerpc/vm_machdep.c8
-rw-r--r--sys/vm/vm_extern.h2
7 files changed, 30 insertions, 19 deletions
diff --git a/sys/alpha/alpha/vm_machdep.c b/sys/alpha/alpha/vm_machdep.c
index 2f0dabb..a77458c 100644
--- a/sys/alpha/alpha/vm_machdep.c
+++ b/sys/alpha/alpha/vm_machdep.c
@@ -97,15 +97,17 @@
/*
* quick version of vm_fault
*/
-void
+int
vm_fault_quick(v, prot)
caddr_t v;
int prot;
{
+ int r;
if (prot & VM_PROT_WRITE)
- subyte(v, fubyte(v));
+ r = subyte(v, fubyte(v));
else
- fubyte(v);
+ r = fubyte(v);
+ return(r);
}
/*
diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c
index b907f27..dc76336 100644
--- a/sys/amd64/amd64/vm_machdep.c
+++ b/sys/amd64/amd64/vm_machdep.c
@@ -93,15 +93,18 @@ static volatile u_int cpu_reset_proxy_active;
/*
* quick version of vm_fault
*/
-void
+int
vm_fault_quick(v, prot)
caddr_t v;
int prot;
{
+ int r;
+
if (prot & VM_PROT_WRITE)
- subyte(v, fubyte(v));
+ r = subyte(v, fubyte(v));
else
- fubyte(v);
+ r = fubyte(v);
+ return(r);
}
/*
diff --git a/sys/i386/i386/vm_machdep.c b/sys/i386/i386/vm_machdep.c
index b907f27..dc76336 100644
--- a/sys/i386/i386/vm_machdep.c
+++ b/sys/i386/i386/vm_machdep.c
@@ -93,15 +93,18 @@ static volatile u_int cpu_reset_proxy_active;
/*
* quick version of vm_fault
*/
-void
+int
vm_fault_quick(v, prot)
caddr_t v;
int prot;
{
+ int r;
+
if (prot & VM_PROT_WRITE)
- subyte(v, fubyte(v));
+ r = subyte(v, fubyte(v));
else
- fubyte(v);
+ r = fubyte(v);
+ return(r);
}
/*
diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c
index c8f8e35..ee883ed 100644
--- a/sys/kern/sys_pipe.c
+++ b/sys/kern/sys_pipe.c
@@ -490,9 +490,8 @@ pipe_build_write_buffer(wpipe, uio)
vm_page_t m;
- vm_fault_quick( (caddr_t) addr, VM_PROT_READ);
- paddr = pmap_kextract(addr);
- if (!paddr) {
+ if (vm_fault_quick((caddr_t)addr, VM_PROT_READ) < 0 ||
+ (paddr = pmap_kextract(addr)) == 0) {
int j;
for(j=0;j<i;j++)
vm_page_unwire(wpipe->pipe_map.ms[j], 1);
diff --git a/sys/powerpc/aim/vm_machdep.c b/sys/powerpc/aim/vm_machdep.c
index 2f0dabb..a77458c 100644
--- a/sys/powerpc/aim/vm_machdep.c
+++ b/sys/powerpc/aim/vm_machdep.c
@@ -97,15 +97,17 @@
/*
* quick version of vm_fault
*/
-void
+int
vm_fault_quick(v, prot)
caddr_t v;
int prot;
{
+ int r;
if (prot & VM_PROT_WRITE)
- subyte(v, fubyte(v));
+ r = subyte(v, fubyte(v));
else
- fubyte(v);
+ r = fubyte(v);
+ return(r);
}
/*
diff --git a/sys/powerpc/powerpc/vm_machdep.c b/sys/powerpc/powerpc/vm_machdep.c
index 2f0dabb..a77458c 100644
--- a/sys/powerpc/powerpc/vm_machdep.c
+++ b/sys/powerpc/powerpc/vm_machdep.c
@@ -97,15 +97,17 @@
/*
* quick version of vm_fault
*/
-void
+int
vm_fault_quick(v, prot)
caddr_t v;
int prot;
{
+ int r;
if (prot & VM_PROT_WRITE)
- subyte(v, fubyte(v));
+ r = subyte(v, fubyte(v));
else
- fubyte(v);
+ r = fubyte(v);
+ return(r);
}
/*
diff --git a/sys/vm/vm_extern.h b/sys/vm/vm_extern.h
index c8b90ba..2934eba 100644
--- a/sys/vm/vm_extern.h
+++ b/sys/vm/vm_extern.h
@@ -99,7 +99,7 @@ void vslock __P((caddr_t, u_int));
void vsunlock __P((caddr_t, u_int, int));
void vm_object_print __P((/* db_expr_t */ long, boolean_t, /* db_expr_t */ long,
char *));
-void vm_fault_quick __P((caddr_t v, int prot));
+int vm_fault_quick __P((caddr_t v, int prot));
#endif /* KERNEL */
OpenPOWER on IntegriCloud