lkml.org 
[lkml]   [2014]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] aio: Fix type of iterator variable in do_io_submit()
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 *). Fix it (and also remove the unnecessary
> initialization to 0).

You're not wrong, but do we *really* want users to be able to submit
144115188075855872 I/Os with a single system call? How about limiting
them to a single billion? Given that they have to allocate 64GB of
*control* data structures to submit this many I/Os, I think this will
be sufficient for many years to come.


\
 
 \ /
  Last update: 2014-04-27 00:01    [W:0.810 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site