From owner-freebsd-bugs Mon May 15 8:20:10 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id AB59E37BAAB for ; Mon, 15 May 2000 08:20:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id IAA37843; Mon, 15 May 2000 08:20:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Date: Mon, 15 May 2000 08:20:02 -0700 (PDT) Message-Id: <200005151520.IAA37843@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: "Paul H. Anderson" Subject: Re: i386/18095: critical VM mmap/madvise bug Reply-To: "Paul H. Anderson" Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR i386/18095; it has been noted by GNATS. From: "Paul H. Anderson" To: Matthew Dillon 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 > > > 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