ovl: remove privs in ovl_copyfile()
authorAmir Goldstein <amir73il@gmail.com>
Mon, 17 Oct 2022 15:06:38 +0000 (17:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:14:00 +0000 (13:14 +0100)
commit5dc34f9aaaf446e18b11a5f8f4cbb640ea9a145f
treee9e04eadb000e0ccc23681646d600be0a493a6af
parent9636e70ee2d3721bfd46b7f3a09150b432632fc0
ovl: remove privs in ovl_copyfile()

[ Upstream commit b306e90ffabdaa7e3b3350dbcd19b7663e71ab17 ]

Underlying fs doesn't remove privs because copy_range/remap_range are
called with privileged mounter credentials.

This fixes some failures in fstest generic/673.

Fixes: 8ede205541ff ("ovl: add reflink/copyfile/dedup support")
Acked-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/overlayfs/file.c