]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ovl: use O_LARGEFILE in ovl_copy_up()
authorDavid Howells <dhowells@redhat.com>
Fri, 18 Sep 2015 10:45:12 +0000 (11:45 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Nov 2015 22:37:37 +0000 (14:37 -0800)
commitc631a0bb36d912fe4d649ce9e47670d0319a49ee
tree2e8e0019708c13d66cf8189fb9f6c5f60dea7f89
parent5e3e1d57d06c1fe68516fd05874fa310c3f19a2c
ovl: use O_LARGEFILE in ovl_copy_up()

commit 0480334fa60488d12ae101a02d7d9e1a3d03d7dd upstream.

Open the lower file with O_LARGEFILE in ovl_copy_up().

Pass O_LARGEFILE unconditionally in ovl_copy_up_data() as it's purely for
catching 32-bit userspace dealing with a file large enough that it'll be
mishandled if the application isn't aware that there might be an integer
overflow.  Inside the kernel, there shouldn't be any problems.

Reported-by: Ulrich Obergfell <uobergfe@redhat.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/overlayfs/copy_up.c