From 0704324a55a42c80542115740ffbed7bc6d68db8 Mon Sep 17 00:00:00 2001 From: David Greenman Date: Wed, 20 Sep 1995 13:01:17 +0000 Subject: [PATCH] Fix rounding bug in last commit that would have caused the problem to not be completely fixed. --- sys/amd64/amd64/mem.c | 4 ++-- sys/i386/i386/mem.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/amd64/amd64/mem.c b/sys/amd64/amd64/mem.c index 13fafbc90fd5..6abd68e36732 100644 --- a/sys/amd64/amd64/mem.c +++ b/sys/amd64/amd64/mem.c @@ -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; diff --git a/sys/i386/i386/mem.c b/sys/i386/i386/mem.c index 13fafbc90fd5..6abd68e36732 100644 --- a/sys/i386/i386/mem.c +++ b/sys/i386/i386/mem.c @@ -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;