Re: read() MAX_IO_SIZE bytes, more than SSIZE_MAX?
- From
Joachim Schmitz <jojo@schmitz-digital.de>
- Date
- Feb 7, 2015, 19:14 UTC
- Message-ID
- <loom.20150207T201128-590@post.gmane.org>
- In-Reply-To
- <loom.20150207T174514-727@post.gmane.org>
Joachim Schmitz <jojo <at> schmitz-digital.de> writes:
<snip>
> and as a (rather strange) > consequence mmap() (from compat/mmap.c) fails with EACCESS (why
EACCESS?),
> because xpread() returns something > 0.
Seems mmap() should either set errno to EINVAL or not set it at all an just 'forward' whatever xpread() has set.
As per http://man7.org/linux/man-pages/man2/mmap.2.html mmap() sets EINVAL if (amongst other things) it doesn't like the value of len, exactly the case here.
bye, Jojo