From owner-svn-src-all@FreeBSD.ORG Fri Jan 27 08:50:34 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 D364B106564A; Fri, 27 Jan 2012 08:50:34 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail05.syd.optusnet.com.au (mail05.syd.optusnet.com.au [211.29.132.186]) by mx1.freebsd.org (Postfix) with ESMTP id 544E58FC12; Fri, 27 Jan 2012 08:50:33 +0000 (UTC) Received: from c211-30-171-136.carlnfd1.nsw.optusnet.com.au (c211-30-171-136.carlnfd1.nsw.optusnet.com.au [211.30.171.136]) by mail05.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id q0R8oUCA011934 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 27 Jan 2012 19:50:31 +1100 Date: Fri, 27 Jan 2012 19:50:30 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Gleb Smirnoff In-Reply-To: <20120126153641.GA68112@FreeBSD.org> Message-ID: <20120127194612.H1547@besplex.bde.org> References: <201201261159.q0QBxma2086162@svn.freebsd.org> <20120126233110.C960@besplex.bde.org> <20120126153641.GA68112@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Bruce Evans Subject: Re: svn commit: r230583 - head/sys/kern 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 Jan 2012 08:50:34 -0000 On Thu, 26 Jan 2012, Gleb Smirnoff wrote: > On Thu, Jan 26, 2012 at 11:53:57PM +1100, Bruce Evans wrote: > B> > @@ -1552,6 +1552,12 @@ aio_aqueue(struct thread *td, struct aio > B> > return (error); > B> > } > B> > > B> > + /* XXX: aio_nbytes is later casted to signed types. */ > B> > + if ((int)aiocbe->uaiocb.aio_nbytes < 0) { > B> > B> This should avoid implementation-defined behaviour by checking if > B> > B> (uncast)aiocbe->uaiocb.aio_nbytes > INT_MAX. > Is the attached patch okay? Yes. It now matches the style used for read^Wsys_read() and friends. This used to have to fit the count in "int uio_resid". uio_resid now has type ssize_t, but for some reason the old INT_MAX limits remain. Bruce