summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-12-14 12:45:25 -0800
committerBen Hutchings <ben@decadent.org.uk>2017-02-23 03:54:48 +0000
commit9c868a2790b5a6c3a9c78da87d06158e4bd48e47 (patch)
treeacbdb9bb3ea2cd51fd25327e02eb9712a3e7caf8 /Makefile
parentafd9c2402bdfdbc813587faf7f0e8e1f94c2ee91 (diff)
downloadlinux-stable-9c868a2790b5a6c3a9c78da87d06158e4bd48e47.tar.gz
linux-stable-9c868a2790b5a6c3a9c78da87d06158e4bd48e47.tar.bz2
linux-stable-9c868a2790b5a6c3a9c78da87d06158e4bd48e47.zip
vfs,mm: fix return value of read() at s_maxbytes
commit d05c5f7ba164aed3db02fb188c26d0dd94f5455b upstream. We truncated the possible read iterator to s_maxbytes in commit c2a9737f45e2 ("vfs,mm: fix a dead loop in truncate_inode_pages_range()"), but our end condition handling was wrong: it's not an error to try to read at the end of the file. Reading past the end should return EOF (0), not EINVAL. See for example https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1649342 http://lists.gnu.org/archive/html/bug-coreutils/2016-12/msg00008.html where a md5sum of a maximally sized file fails because the final read is exactly at s_maxbytes. Fixes: c2a9737f45e2 ("vfs,mm: fix a dead loop in truncate_inode_pages_range()") Reported-by: Joseph Salisbury <joseph.salisbury@canonical.com> Cc: Wei Fang <fangwei1@huawei.com> Cc: Christoph Hellwig <hch@infradead.org> Cc: Dave Chinner <david@fromorbit.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions