Date: Sun, 5 Nov 2017 15:06:07 +0200 From: Konstantin Belousov <kostikbel@gmail.com> To: Conrad Meyer <cem@freebsd.org> Cc: src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r325386 - head/sys/kern Message-ID: <20171105130607.GA2566@kib.kiev.ua> In-Reply-To: <CAG6CVpUaXSX26Bc839kn96EXnUjtGyQ3_eNJPhsRB%2Bv6G6gH1Q@mail.gmail.com> References: <201711041049.vA4AnZUE096709@repo.freebsd.org> <CAG6CVpUaXSX26Bc839kn96EXnUjtGyQ3_eNJPhsRB%2Bv6G6gH1Q@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Nov 04, 2017 at 12:04:56PM -0700, Conrad Meyer wrote: > This is a functional change, because MPASS (via KASSERT) is only > enabled on DEBUG kernels. Ideally we would have a kind of ASSERT that > worked on NODEBUG kernels. Why would we need such thing ? Our conventions are clear: consistency checks are normally done with KASSERT() and enabled for DEBUG (INVARIANTS or harder) configurations. We only leave explicit panics in the production kernels when there continuation of operations is worse then abort, e.g. when UFS detects the metadata corruption. The submission perfectly fits into this model. > > Best, > Conrad > > On Sat, Nov 4, 2017 at 3:49 AM, Konstantin Belousov <kib@freebsd.org> wrote: > > Author: kib > > Date: Sat Nov 4 10:49:34 2017 > > New Revision: 325386 > > URL: https://svnweb.freebsd.org/changeset/base/325386 > > > > Log: > > Convert explicit panic() call to assert. > > > > Based on github pull request: #113 > > Submitted by: pmarillo@github > > MFC after: 1 week > > > > Modified: > > head/sys/kern/kern_umtx.c > > > > Modified: head/sys/kern/kern_umtx.c > > ============================================================================== > > --- head/sys/kern/kern_umtx.c Sat Nov 4 10:10:34 2017 (r325385) > > +++ head/sys/kern/kern_umtx.c Sat Nov 4 10:49:34 2017 (r325386) > > @@ -1579,8 +1579,7 @@ umtx_pi_setowner(struct umtx_pi *pi, struct thread *ow > > > > uq_owner = owner->td_umtxq; > > mtx_assert(&umtx_lock, MA_OWNED); > > - if (pi->pi_owner != NULL) > > - panic("pi_owner != NULL"); > > + MPASS(pi->pi_owner == NULL); > > pi->pi_owner = owner; > > TAILQ_INSERT_TAIL(&uq_owner->uq_pi_contested, pi, pi_link); > > } > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20171105130607.GA2566>