Date: Fri, 27 Jan 2012 11:12:44 +0200 From: Kostik Belousov <kostikbel@gmail.com> To: Bruce Evans <brde@optusnet.com.au> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff <glebius@freebsd.org>, src-committers@freebsd.org Subject: Re: svn commit: r230583 - head/sys/kern Message-ID: <20120127091244.GZ2726@deviant.kiev.zoral.com.ua> In-Reply-To: <20120127194612.H1547@besplex.bde.org> References: <201201261159.q0QBxma2086162@svn.freebsd.org> <20120126233110.C960@besplex.bde.org> <20120126153641.GA68112@FreeBSD.org> <20120127194612.H1547@besplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
On Fri, Jan 27, 2012 at 07:50:30PM +1100, Bruce Evans wrote:
> 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.
Well, I can revive the patch. I still think it is good to get rid of
the limit.
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (FreeBSD)
iEYEARECAAYFAk8iaowACgkQC3+MBN1Mb4iylgCfataZKijFQ1rXTJojfdaX18cp
CMIAoIKpWYIbWfnLE4Tc5OF9/QYDoFiv
=j2qm
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120127091244.GZ2726>
