ovl: setattr: check permissions before copy-up
authorMiklos Szeredi <miklos@szeredi.hu>
Fri, 11 Dec 2015 15:30:49 +0000 (16:30 +0100)
committerSasha Levin <sasha.levin@oracle.com>
Mon, 1 Feb 2016 16:37:32 +0000 (11:37 -0500)
commitc8e1bebf86dff9277e21e9a2769724ca05f40c02
treecc52a5d19df60bbf50f64d163dcde7666f0e5053
parent3d51d36e7148182e76fc36d66c494d192c410fdd
ovl: setattr: check permissions before copy-up

[ Upstream commit cf9a6784f7c1b5ee2b9159a1246e327c331c5697 ]

Without this copy-up of a file can be forced, even without actually being
allowed to do anything on the file.

[Arnd Bergmann] include <linux/pagemap.h> for PAGE_CACHE_SIZE (used by
MAX_LFS_FILESIZE definition).

Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Cc: <stable@vger.kernel.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
fs/overlayfs/inode.c
fs/overlayfs/super.c