From owner-svn-src-all@FreeBSD.ORG Mon Jun 7 23:34:13 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A4DC9106564A; Mon, 7 Jun 2010 23:34:13 +0000 (UTC) (envelope-from rrs@lakerest.net) Received: from lakerest.net (unknown [IPv6:2001:240:585:2:213:d4ff:fef3:2d8d]) by mx1.freebsd.org (Postfix) with ESMTP id 2D1238FC15; Mon, 7 Jun 2010 23:34:13 +0000 (UTC) Received: from mobile-166-187-104-083.mycingular.net (mobile-166-187-104-083.mycingular.net [166.187.104.83] (may be forged)) (authenticated bits=0) by lakerest.net (8.14.3/8.14.3) with ESMTP id o57NXxti073095 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Mon, 7 Jun 2010 19:34:10 -0400 (EDT) (envelope-from rrs@lakerest.net) DKIM-Signature: a=rsa-sha1; c=simple/simple; d=lakerest.net; s=mail; t=1275953652; h=Cc:Message-Id:From:To:In-Reply-To:Content-Type: Content-Transfer-Encoding:Mime-Version:Subject:Date:References: X-Mailer; b=AHFRJP2QT98d/7UKFgUT/dXN7do8Bd1/BOJvb4VGBtIYzbJZWReAEEC 7obNspNItWmHk5jtku1bfny0Pv549vg== Message-Id: <0823DFC0-2F58-4F79-A242-81F563B22C42@lakerest.net> From: Randall Stewart To: Pawel Jakub Dawidek In-Reply-To: <20100607200743.GB4468@garage.freebsd.pl> Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Date: Mon, 7 Jun 2010 13:55:08 -0700 References: <201006061611.o56GBHbE089883@svn.freebsd.org> <20100607200743.GB4468@garage.freebsd.pl> X-Mailer: Apple Mail (2.936) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r208876 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jun 2010 23:34:13 -0000 Cool... I will move these over to that assert... And the invariant is ok since this function only is there when you compile invariant in. R On Jun 7, 2010, at 1:07 PM, Pawel Jakub Dawidek wrote: > On Sun, Jun 06, 2010 at 04:11:17PM +0000, Randall Stewart wrote: >> Author: rrs >> Date: Sun Jun 6 16:11:16 2010 >> New Revision: 208876 >> URL: http://svn.freebsd.org/changeset/base/208876 >> >> Log: >> 1) Further enhance the INVARIANT lock validation (no locks) are >> held by checking the create and inp locks as well. > [...] >> + if (mtx_owned(&inp->inp_create_mtx)) { >> + panic("Own create lock on inp"); >> + } >> + if (mtx_owned(&inp->inp_mtx)) { >> + panic("Own inp lock on inp"); >> + } > > If you replace this with: > > mtx_assert(&inp->inp_create_mtx, MA_NOTOWNED); > mtx_assert(&inp->inp_mtx, MA_NOTOWNED); > > But the kernel has to be compiled with INVARIANTS to make it work. > > -- > Pawel Jakub Dawidek http://www.wheelsystems.com > pjd@FreeBSD.org http://www.FreeBSD.org > FreeBSD committer Am I Evil? Yes, I Am! ------------------------------ Randall Stewart 803-317-4952 (cell)