OSDN Git Service

ovl: use O_LARGEFILE in ovl_copy_up()
authorDavid Howells <dhowells@redhat.com>
Fri, 18 Sep 2015 10:45:12 +0000 (11:45 +0100)
committerMiklos Szeredi <miklos@szeredi.hu>
Mon, 12 Oct 2015 13:56:20 +0000 (15:56 +0200)
commit0480334fa60488d12ae101a02d7d9e1a3d03d7dd
treef9dfbb52a2ada460e3513bcf4e58ac488d8c9d3b
parent64291f7db5bd8150a74ad2036f1037e6a0428df2
ovl: use O_LARGEFILE in ovl_copy_up()

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>
Cc: <stable@vger.kernel.org> # v3.18+
fs/overlayfs/copy_up.c