Date: Mon, 7 Jun 2010 13:55:08 -0700 From: Randall Stewart <rrs@lakerest.net> To: Pawel Jakub Dawidek <pjd@FreeBSD.org> Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r208876 - head/sys/netinet Message-ID: <0823DFC0-2F58-4F79-A242-81F563B22C42@lakerest.net> In-Reply-To: <20100607200743.GB4468@garage.freebsd.pl> References: <201006061611.o56GBHbE089883@svn.freebsd.org> <20100607200743.GB4468@garage.freebsd.pl>
next in thread | previous in thread | raw e-mail | index | archive | help
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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0823DFC0-2F58-4F79-A242-81F563B22C42>