diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/uvm/uvm_device.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/uvm/uvm_device.c b/sys/uvm/uvm_device.c index 2430fc5ef17..b61ff7d7157 100644 --- a/sys/uvm/uvm_device.c +++ b/sys/uvm/uvm_device.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvm_device.c,v 1.13 2001/11/01 12:13:47 art Exp $ */ +/* $OpenBSD: uvm_device.c,v 1.14 2001/11/01 14:31:25 art Exp $ */ /* $NetBSD: uvm_device.c,v 1.22 2000/05/28 10:21:55 drochner Exp $ */ /* @@ -149,6 +149,9 @@ udv_attach(arg, accessprot, off, size) mapfn == (paddr_t (*) __P((dev_t, off_t, int)))nullop) return(NULL); + if (off < 0) + return (NULL); + /* * Check that the specified range of the device allows the * desired protection. @@ -408,8 +411,8 @@ udv_fault(ufi, vaddr, pps, npages, centeridx, fault_type, access_type, flags) struct uvm_device *udv = (struct uvm_device *)uobj; vaddr_t curr_va; int curr_offset; - paddr_t paddr; - int lcv, retval, mdpgno; + paddr_t paddr, mdpgno; + int lcv, retval; dev_t device; paddr_t (*mapfn) __P((dev_t, off_t, int)); vm_prot_t mapprot; |