From owner-cvs-all@FreeBSD.ORG Thu Nov 25 00:13:40 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D348316A4D1; Thu, 25 Nov 2004 00:13:40 +0000 (GMT) Received: from blackwater.lemis.com (wantadilla.lemis.com [192.109.197.135]) by mx1.FreeBSD.org (Postfix) with ESMTP id 19D7943D1D; Thu, 25 Nov 2004 00:13:39 +0000 (GMT) (envelope-from grog@lemis.com) Received: by blackwater.lemis.com (Postfix, from userid 1004) id 88B6185622; Thu, 25 Nov 2004 10:43:36 +1030 (CST) Date: Thu, 25 Nov 2004 10:43:36 +1030 From: Greg 'groggy' Lehey To: Xin LI Message-ID: <20041125001336.GP43681@wantadilla.lemis.com> References: <200411241856.iAOIuDo5055072@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="KI6XeYrntNhU1GwB" Content-Disposition: inline In-Reply-To: <200411241856.iAOIuDo5055072@repoman.freebsd.org> User-Agent: Mutt/1.4.2.1i Organization: The FreeBSD Project Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/vm vm_contig.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Nov 2004 00:13:41 -0000 --KI6XeYrntNhU1GwB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wednesday, 24 November 2004 at 18:56:13 +0000, Xin LI wrote: > delphij 2004-11-24 18:56:13 UTC > > FreeBSD src repository > > Modified files: > sys/vm vm_contig.c > Log: > Try to close a potential, but serious race in our VM subsystem. > > Historically, our contigmalloc1() and contigmalloc2() assumes > that a page in PQ_CACHE can be unconditionally reused by busying > and freeing it. Unfortunatelly, when object happens to be not > NULL, the code will set m->object to NULL and disregard the fact > that the page is actually in the VM page bucket, resulting in > page bucket hash table corruption and finally, a filesystem > corruption, or a 'page not in hash' panic. > > This commit has borrowed the idea taken from DragonFlyBSD's fix > to the VM fix by Matthew Dillon[1]. This version of patch will > do the following checks: > > - When scanning pages in PQ_CACHE, check hold_count and > skip over pages that are held temporarily. > - For pages in PQ_CACHE and selected as candidate of being > freed, check if it is busy at that time. > > Note: It seems that this is might be unrelated to kern/72539. Nice log message! Thanks. Greg -- See complete headers for address and phone numbers. --KI6XeYrntNhU1GwB Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFBpSOwIubykFB6QiMRAuajAKCa25SklZiiNrqN7rfjz9sZWO9FaACfdxkL wXkqhVmDZs/OES6rS5Cq4Pc= =ikq5 -----END PGP SIGNATURE----- --KI6XeYrntNhU1GwB--