]> git.baikalelectronics.ru Git - kernel.git/commit
fuse: don't overflow LLONG_MAX with end offset
authorMiklos Szeredi <mszeredi@redhat.com>
Thu, 6 Feb 2020 15:39:28 +0000 (16:39 +0100)
committerMiklos Szeredi <mszeredi@redhat.com>
Thu, 6 Feb 2020 15:39:28 +0000 (16:39 +0100)
commit510cfc5f1bba405b81c57779537169fa8c30c58c
treebf2d245ba2d6ea3937423cc5080228474b759a76
parentcb0633006da6a6c35e72cb41dce6fcb8f5161e99
fuse: don't overflow LLONG_MAX with end offset

Handle the special case of fuse_readpages() wanting to read the last page
of a hugest file possible and overflowing the end offset in the process.

This is basically to unbreak xfstests:generic/525 and prevent filesystems
from doing bad things with an overflowing offset.

Reported-by: Xiao Yang <ice_yangxiao@163.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/file.c