ovl: setattr: check permissions before copy-up

[ Upstream commit cf9a6784f7 ]

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>
This commit is contained in:
Miklos Szeredi 2015-12-11 16:30:49 +01:00 • committed by Sasha Levin
commit c8e1bebf86
2 changed files with 15 additions and 0 deletions