Date: Mon, 15 May 2000 08:20:02 -0700 (PDT) From: "Paul H. Anderson" <pha@pdq.com> To: freebsd-bugs@FreeBSD.org Subject: Re: i386/18095: critical VM mmap/madvise bug Message-ID: <200005151520.IAA37843@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: "Paul H. Anderson" <pha@pdq.com> To: Matthew Dillon <dillon@apollo.backplane.com> Cc: FreeBSD-gnats-submit@freebsd.org Subject: Re: i386/18095: critical VM mmap/madvise bug Date: Mon, 15 May 2000 11:06:19 -0400 (EDT) Hi, I was able to verify that installation of this fix appears to correct the madvise problem at my site on my machines, with my application as well. I have not done extensive testing of the overall system to see if for some reason it introduces anything new, but I doubt it will. Thank you very much, Matt, and anyone else who worked on fixing the problem! Great job! Paul On Sun, 14 May 2000, Matthew Dillon wrote: > 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), > +---------------------------------------------------+ | Paul Anderson Public Data Queries, Inc. | | pha@pdq.com 734-213-4964 x308 | +---------------------------------------------------+ 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?200005151520.IAA37843>