From owner-svn-src-head@FreeBSD.ORG Mon Mar 24 18:59:51 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 347A7649; Mon, 24 Mar 2014 18:59:51 +0000 (UTC) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1002CC35; Mon, 24 Mar 2014 18:59:50 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id s2OIxooX041940 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 24 Mar 2014 11:59:50 -0700 (PDT) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id s2OIxoQB041939; Mon, 24 Mar 2014 11:59:50 -0700 (PDT) (envelope-from jmg) Date: Mon, 24 Mar 2014 11:59:50 -0700 From: John-Mark Gurney To: Maksim Yevmenkin Subject: Re: svn commit: r263690 - head/sys/kern Message-ID: <20140324185949.GR32089@funkthat.com> References: <201403241813.s2OIDfEd024721@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201403241813.s2OIDfEd024721@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Mon, 24 Mar 2014 11:59:50 -0700 (PDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Mar 2014 18:59:51 -0000 Maksim Yevmenkin wrote this message on Mon, Mar 24, 2014 at 18:13 +0000: > Author: emax > Date: Mon Mar 24 18:13:41 2014 > New Revision: 263690 > URL: http://svnweb.freebsd.org/changeset/base/263690 > > Log: > change defaule permissions on /dev/devstat. while i'm here remove > D_NEEDGIANT flag I know that the following change is part of the remove D_NEEDGIANT, but I'm puzzled how this code either worked before, or continues to work.. It looks like pagelist was suppose to be protected by devstat_mutex, but previously wasn't and that this is fixing that bug, is this correct? > @@ -482,13 +481,16 @@ devstat_mmap(struct cdev *dev, vm_ooffse > > if (nprot != VM_PROT_READ) > return (-1); > + mtx_lock(&devstat_mutex); > TAILQ_FOREACH(spp, &pagelist, list) { > if (offset == 0) { > *paddr = vtophys(spp->stat); > + mtx_unlock(&devstat_mutex); > return (0); > } > offset -= PAGE_SIZE; > } > + mtx_unlock(&devstat_mutex); > return (-1); > } > -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."