diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2003-01-29 22:57:11 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2003-01-29 22:57:11 +0000 |
commit | cf0d65d91cc152ce89d0b01774a3a5543d0feb36 (patch) | |
tree | 8dd7b4ddf64328ba0c4c4d7b5dbd2401286e3165 /sys | |
parent | 8b75b1460f0cabc8bf7e7f04cf84fe56130e7ac1 (diff) |
check the uvm_fault_wire() for failure, just like other calls; art@ ok
Diffstat (limited to 'sys')
-rw-r--r-- | sys/uvm/uvm_glue.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/uvm/uvm_glue.c b/sys/uvm/uvm_glue.c index 6d307bc47fa..dcc0dd1dd78 100644 --- a/sys/uvm/uvm_glue.c +++ b/sys/uvm/uvm_glue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_glue.c,v 1.33 2002/06/09 02:11:47 jsyn Exp $ */ +/* $OpenBSD: uvm_glue.c,v 1.34 2003/01/29 22:57:10 mickey Exp $ */ /* $NetBSD: uvm_glue.c,v 1.44 2001/02/06 19:54:44 eeh Exp $ */ /* @@ -377,12 +377,13 @@ uvm_swapin(p) struct proc *p; { vaddr_t addr; - int s; + int rv, s; addr = (vaddr_t)p->p_addr; /* make P_INMEM true */ - uvm_fault_wire(kernel_map, addr, addr + USPACE, - VM_PROT_READ | VM_PROT_WRITE); + if ((rv = uvm_fault_wire(kernel_map, addr, addr + USPACE, + VM_PROT_READ | VM_PROT_WRITE)) != KERN_SUCCESS) + panic("uvm_swapin: uvm_fault_wire failed: %d", rv); /* * Some architectures need to be notified when the user area has |