Fix rounding bug in last commit that would have caused the problem to not

be completely fixed.
This commit is contained in:
David Greenman 1995-09-20 13:01:17 +00:00
parent fa78e67a41
commit 0704324a55
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=10924
2 changed files with 4 additions and 4 deletions

View file

@ -38,7 +38,7 @@
*
* from: Utah $Hdr: mem.c 1.13 89/10/08$
* from: @(#)mem.c 7.2 (Berkeley) 5/9/91
* $Id: mem.c,v 1.12 1995/09/09 18:09:46 davidg Exp $
* $Id: mem.c,v 1.13 1995/09/15 23:49:23 davidg Exp $
*/
/*
@ -172,7 +172,7 @@ mmrw(dev, uio, flags)
* that we don't create any zero-fill pages.
*/
addr = trunc_page(uio->uio_offset);
eaddr = round_page(addr + c);
eaddr = round_page(uio->uio_offset + c);
for (; addr < eaddr; addr += PAGE_SIZE)
if (pmap_extract(kernel_pmap, addr) == 0)
return EFAULT;

View file

@ -38,7 +38,7 @@
*
* from: Utah $Hdr: mem.c 1.13 89/10/08$
* from: @(#)mem.c 7.2 (Berkeley) 5/9/91
* $Id: mem.c,v 1.12 1995/09/09 18:09:46 davidg Exp $
* $Id: mem.c,v 1.13 1995/09/15 23:49:23 davidg Exp $
*/
/*
@ -172,7 +172,7 @@ mmrw(dev, uio, flags)
* that we don't create any zero-fill pages.
*/
addr = trunc_page(uio->uio_offset);
eaddr = round_page(addr + c);
eaddr = round_page(uio->uio_offset + c);
for (; addr < eaddr; addr += PAGE_SIZE)
if (pmap_extract(kernel_pmap, addr) == 0)
return EFAULT;