From owner-freebsd-current@FreeBSD.ORG Sun Apr 4 21:11:53 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DB03F16A4CE; Sun, 4 Apr 2004 21:11:53 -0700 (PDT) Received: from newman.gte.com (newman.gte.com [132.197.8.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6403B43D39; Sun, 4 Apr 2004 21:11:52 -0700 (PDT) (envelope-from ak03@gte.com) Received: from h132-197-179-27.gte.com (kanpc.gte.com [132.197.179.27]) by newman.gte.com (8.9.1/8.9.1) with ESMTP id AAA03868; Mon, 5 Apr 2004 00:11:48 -0400 (EDT) Received: from kanpc.gte.com (ak03@localhost [127.0.0.1]) i354BmCX040088; Mon, 5 Apr 2004 00:11:48 -0400 (EDT) (envelope-from ak03@kanpc.gte.com) Received: (from ak03@localhost) by kanpc.gte.com (8.12.11/8.12.11/Submit) id i354Bl9c040087; Mon, 5 Apr 2004 00:11:47 -0400 (EDT) (envelope-from ak03) Date: Mon, 5 Apr 2004 00:11:47 -0400 From: Alexander Kabaev To: Alan Cox Message-ID: <20040405041147.GA39962@kanpc.gte.com> References: <20040402191254.GK26131@elvis.mu.org> <35917.1080933274@critter.freebsd.dk> <20040402195957.GN26131@elvis.mu.org> <20040404201251.GP15786@cs.rice.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040404201251.GP15786@cs.rice.edu> User-Agent: Mutt/1.5.6i cc: alc@freebsd.org cc: kan@freebsd.org cc: Poul-Henning Kamp cc: Alfred Perlstein cc: current@freebsd.org Subject: Re: mmap breakage? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Apr 2004 04:11:54 -0000 On Sun, Apr 04, 2004 at 03:12:51PM -0500, Alan Cox wrote: > Alfred, > > Please try the attached patch. This problems appears to be a > consequence of vm/vm_mmap.c revision 1.180, where as part of a much > needed code reorganization for locking the check for the /dev/zero > special case got placed after the permissions check for the general > case. This patch simply delays the permissions check for devices > until you have the necessary lock to also check for /dev/zero. > > Since kan@ authored the reorganization, I'm cc:'ing him on this > message for purposes of obtaining a review. (At least one comment > should be updated to reflect my code changes.) > > Regards, > Alan > > Alan, Alfred, I had the following patch which is currently pending a review by Peter Wemm. I meant to commit it on Friday, but ran out of time: http://perforce.freebsd.org/chv.cgi?CH=50213 -- Alexander Kabaev