Module Name: src Committed By: chs Date: Sat Jan 10 23:35:02 UTC 2015
Modified Files: src/sys/uvm: uvm_mmap.c Log Message: in uvm_mmap_dev(), use the passed-in offset instead of 0. from Onno van der Linden in PR 49536. To generate a diff of this commit: cvs rdiff -u -r1.150 -r1.151 src/sys/uvm/uvm_mmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/uvm/uvm_mmap.c diff -u src/sys/uvm/uvm_mmap.c:1.150 src/sys/uvm/uvm_mmap.c:1.151 --- src/sys/uvm/uvm_mmap.c:1.150 Sun Dec 14 23:48:58 2014 +++ src/sys/uvm/uvm_mmap.c Sat Jan 10 23:35:02 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_mmap.c,v 1.150 2014/12/14 23:48:58 chs Exp $ */ +/* $NetBSD: uvm_mmap.c,v 1.151 2015/01/10 23:35:02 chs Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -46,7 +46,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: uvm_mmap.c,v 1.150 2014/12/14 23:48:58 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_mmap.c,v 1.151 2015/01/10 23:35:02 chs Exp $"); #include "opt_compat_netbsd.h" #include "opt_pax.h" @@ -1084,13 +1084,13 @@ uvm_mmap_dev(struct proc *p, void **addr *addrp = (void *)p->p_emul->e_vm_default_addr(p, (vaddr_t)p->p_vmspace->vm_daddr, len); - uobj = udv_attach(dev, prot, 0, len); + uobj = udv_attach(dev, prot, off, len); if (uobj == NULL) return EINVAL; error = uvm_mmap(&p->p_vmspace->vm_map, (vaddr_t *)addrp, (vsize_t)len, prot, prot, flags, UVM_ADV_RANDOM, - uobj, 0, p->p_rlimit[RLIMIT_MEMLOCK].rlim_cur); + uobj, off, p->p_rlimit[RLIMIT_MEMLOCK].rlim_cur); return error; }