From owner-svn-src-all@FreeBSD.ORG Fri Jul 27 11:20:29 2012 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 2DA4C106566B; Fri, 27 Jul 2012 11:20:29 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id A36B28FC16; Fri, 27 Jul 2012 11:20:28 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id q6RBJ4d0035365; Fri, 27 Jul 2012 15:19:04 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id q6RBJ4K3035364; Fri, 27 Jul 2012 15:19:04 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 27 Jul 2012 15:19:04 +0400 From: Gleb Smirnoff To: Konstantin Belousov Message-ID: <20120727111904.GQ14135@FreeBSD.org> References: <201207270916.q6R9Gm23086648@svn.freebsd.org> <20120727111237.GC2676@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20120727111237.GC2676@deviant.kiev.zoral.com.ua> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r238828 - head/sys/sys 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: Fri, 27 Jul 2012 11:20:29 -0000 On Fri, Jul 27, 2012 at 02:12:37PM +0300, Konstantin Belousov wrote: K> On Fri, Jul 27, 2012 at 09:16:48AM +0000, Gleb Smirnoff wrote: K> > Author: glebius K> > Date: Fri Jul 27 09:16:48 2012 K> > New Revision: 238828 K> > URL: http://svn.freebsd.org/changeset/base/238828 K> > K> > Log: K> > Add assertion for refcount overflow. K> > K> > Submitted by: Andrey Zonov K> > Reviewed by: kib K> It was discussed rather then reviewed. K> K> I suggest that the assert may be expressed as a check after the increment, K> which verifies that counter is != 0. This allows to avoid namespace K> pollution due to limits.h. Hmm, overflowing unsigned is a defined behavior in C. If Bruce agrees, then I'm happy with KASSERT after increment. -- Totus tuus, Glebius.