From owner-svn-src-head@freebsd.org Sat Nov 4 19:05:04 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E798E52FEB; Sat, 4 Nov 2017 19:05:04 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io0-f176.google.com (mail-io0-f176.google.com [209.85.223.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0FB707D3DA; Sat, 4 Nov 2017 19:05:03 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io0-f176.google.com with SMTP id 189so11830223iow.10; Sat, 04 Nov 2017 12:05:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=jKVfKPbSR1GMcvQI/lxnNxMAz7jnLrWNnIZljdWnso8=; b=cppAhAMZTVtOTo73SVJSD0Z42q+sNfcM92f8LQkLk2v6wQVJWPF9Wia48c+/n6upVB mdVUjz/A8rUTtRMX7Fd677w3vFj76OJS9jn0+o/Sc1+c9KohSxSsmSCrf/nGtcRFNwII vDcX90cDwA7lE1uOgXZKwGTN4Kh09TGAbRHmtBs50Hr5C16bgTMuo/f8flpkY3/KIp5l FFi83S6nfqQFJg/J8l94Gx8Y8k6PjdJnd2YcykuT+9mEqs7EGW9/R+pScP4k75E/+dXg L89H+MDiw1oq/DkHOhxzYfXBETiyzSnccNchf4l2ISe6xSXuLxT+zUnRP14oIRukFmOc R9qg== X-Gm-Message-State: AMCzsaU03uP3C4ovGzJXiWzV0uWDv4IhkIdhMBNZOjj+nL1+h2uBrsPh 4korbMC+DMPypWDAhtNAfFNM9Wdr X-Google-Smtp-Source: ABhQp+TmimRRbE9kFr2IbRo0ASH6vewzRM30tyKj9S1Tw/zWRF6YGSrAswnxtHDAu0gR9kLF0NsHYg== X-Received: by 10.107.101.20 with SMTP id z20mr14355335iob.85.1509822297573; Sat, 04 Nov 2017 12:04:57 -0700 (PDT) Received: from mail-io0-f173.google.com (mail-io0-f173.google.com. [209.85.223.173]) by smtp.gmail.com with ESMTPSA id z76sm4020170ioi.57.2017.11.04.12.04.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 04 Nov 2017 12:04:57 -0700 (PDT) Received: by mail-io0-f173.google.com with SMTP id d66so11882977ioe.5; Sat, 04 Nov 2017 12:04:57 -0700 (PDT) X-Received: by 10.107.158.75 with SMTP id h72mr14270322ioe.256.1509822297318; Sat, 04 Nov 2017 12:04:57 -0700 (PDT) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.2.164.130 with HTTP; Sat, 4 Nov 2017 12:04:56 -0700 (PDT) In-Reply-To: <201711041049.vA4AnZUE096709@repo.freebsd.org> References: <201711041049.vA4AnZUE096709@repo.freebsd.org> From: Conrad Meyer Date: Sat, 4 Nov 2017 12:04:56 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r325386 - head/sys/kern To: Konstantin Belousov Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 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: Sat, 04 Nov 2017 19:05:04 -0000 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. Best, Conrad On Sat, Nov 4, 2017 at 3:49 AM, Konstantin Belousov 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); > } >