Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Aug 1999 12:10:02 -0700 (PDT)
From:      Tor.Egge@fast.no
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/12800: buffer leak in cluster_wbuild
Message-ID:  <199908301910.MAA89126@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/12800; it has been noted by GNATS.

From: Tor.Egge@fast.no
To: freebsd-gnats-submit@freebsd.org
Cc: dillon@apollo.backplane.com
Subject: Re: kern/12800: buffer leak in cluster_wbuild
Date: Mon, 30 Aug 1999 21:00:22 +0200

 On FreeBSD it is legal to mmap() regions beyond end of the backing file.
 The supplied test program tried to access pages after the end of the 
 backing file.  That was a bug in the test program, and SIGBUS is the
 normal expected behavior on FreeBSD when accessing those pages.
 
 Matt Dillon has suggested the following patch which is better than
 the one previously suggested by me.
 
 Index: vfs_cluster.c
 ===================================================================
 RCS file: /home/ncvs/src/sys/kern/vfs_cluster.c,v
 retrieving revision 1.88
 diff -u -r1.88 vfs_cluster.c
 --- vfs_cluster.c	1999/08/28 00:46:23	1.88
 +++ vfs_cluster.c	1999/08/30 03:49:02
 @@ -797,8 +797,10 @@
  				if (i != 0) { /* if not first buffer */
  					for (j = 0; j < tbp->b_npages; j += 1) {
  						m = tbp->b_pages[j];
 -						if (m->flags & PG_BUSY)
 +						if (m->flags & PG_BUSY) {
 +							bqrelse(tbp);
  							goto finishcluster;
 +						}
  					}
  				}
  					
 
 
 The problem with corrupt coredumps still remains.
 
 - Tor Egge
 


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?199908301910.MAA89126>