Re: [PATCH] aio: Fix type of iterator variable in do_io_submit()

2014-04-23 Thread Eric Biggers
On Wed, Apr 23, 2014 at 10:42:37AM -0400, Benjamin LaHaise wrote: > Practically speaking, this change has no effect. The io_submit() syscall > will exit far before we even hit INT_MAX because of the limits on the > number of iocbs. Yes it looks like it doesn't actually make a difference due to

Re: [PATCH] aio: Fix type of iterator variable in do_io_submit()

2014-04-23 Thread Benjamin LaHaise
On Wed, Apr 23, 2014 at 10:16:17AM -0400, Matthew Wilcox wrote: > On Tue, Apr 22, 2014 at 05:57:03PM -0500, Eric Biggers wrote: > > do_io_submit() iterated over the userspace iocb structure pointers using > > a variable i of type 'int'. This was wrong since 'nr', the number of > > iocb structure p

Re: [PATCH] aio: Fix type of iterator variable in do_io_submit()

2014-04-23 Thread Matthew Wilcox
On Tue, Apr 22, 2014 at 05:57:03PM -0500, Eric Biggers wrote: > do_io_submit() iterated over the userspace iocb structure pointers using > a variable i of type 'int'. This was wrong since 'nr', the number of > iocb structure pointers, could potentially be up to LONG_MAX / > sizeof(struct iocb *).

[PATCH] aio: Fix type of iterator variable in do_io_submit()

2014-04-22 Thread Eric Biggers
do_io_submit() iterated over the userspace iocb structure pointers using a variable i of type 'int'. This was wrong since 'nr', the number of iocb structure pointers, could potentially be up to LONG_MAX / sizeof(struct iocb *). Fix it (and also remove the unnecessary initialization to 0). Signed