OSDN Git Service

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)
commit2f1398291bf35fe027914ae7a9610d8e601fbfde
treebf2d245ba2d6ea3937423cc5080228474b759a76
parentf658adeea45e430a24c7a157c3d5448925ac2038
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