]> git.baikalelectronics.ru Git - kernel.git/commit
ovl: fix lseek overflow on 32bit
authorMiklos Szeredi <mszeredi@redhat.com>
Mon, 3 Feb 2020 10:41:53 +0000 (11:41 +0100)
committerMiklos Szeredi <mszeredi@redhat.com>
Mon, 3 Feb 2020 10:41:53 +0000 (11:41 +0100)
commit4f482e3decb765399e3c929101d68a6e36242863
treec37419075e0c8749613de0955bf8678b9ff342fa
parente6151936dfaeeae4ddbd91d0cea822c8d9bfcf42
ovl: fix lseek overflow on 32bit

ovl_lseek() is using ssize_t to return the value from vfs_llseek().  On a
32-bit kernel ssize_t is a 32-bit signed int, which overflows above 2 GB.

Assign the return value of vfs_llseek() to loff_t to fix this.

Reported-by: Boris Gjenero <boris.gjenero@gmail.com>
Fixes: 4f353e224ad4 ("ovl: support stacked SEEK_HOLE/SEEK_DATA")
Cc: <stable@vger.kernel.org> # v4.19
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/overlayfs/file.c