svn commit: r230583 - head/sys/kern
Bruce Evans
brde at optusnet.com.au
Fri Jan 27 08:50:34 UTC 2012
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
More information about the svn-src-all
mailing list