Date: Sun, 14 May 2000 12:00:01 -0700 (PDT) From: Matthew Dillon <dillon@apollo.backplane.com> To: freebsd-bugs@FreeBSD.org Subject: Re: i386/18095: critical VM mmap/madvise bug Message-ID: <200005141900.MAA46564@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR i386/18095; it has been noted by GNATS. From: Matthew Dillon <dillon@apollo.backplane.com> To: pha@pdq.com Cc: FreeBSD-gnats-submit@freebsd.org Subject: Re: i386/18095: critical VM mmap/madvise bug Date: Sun, 14 May 2000 11:41:34 -0700 (PDT) Paul, try this patch to /usr/src/sys/vm/vm_map.c and tell me if it works. It appears to work for me when I test using your test program. -Matt Matthew Dillon <dillon@backplane.com> Index: vm_map.c =================================================================== RCS file: /home/ncvs/src/sys/vm/vm_map.c,v retrieving revision 1.187 diff -u -r1.187 vm_map.c --- vm_map.c 2000/02/28 04:10:35 1.187 +++ vm_map.c 2000/05/14 18:31:06 @@ -1127,15 +1127,19 @@ (current != &map->header) && (current->start < end); current = current->next ) { + vm_offset_t useStart; + if (current->eflags & MAP_ENTRY_IS_SUB_MAP) continue; pindex = OFF_TO_IDX(current->offset); count = atop(current->end - current->start); + useStart = current->start; if (current->start < start) { pindex += atop(start - current->start); count -= atop(start - current->start); + useStart = start; } if (current->end > end) count -= atop(current->end - end); @@ -1148,7 +1152,7 @@ if (behav == MADV_WILLNEED) { pmap_object_init_pt( map->pmap, - current->start, + useStart, current->object.vm_object, pindex, (count << PAGE_SHIFT), To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200005141900.MAA46564>