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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 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.

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.

		-ben
-- 
"Thought is the essence of where you are now."
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux