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:31:54 +0000 (13:31 +0100)
commit155428ea202684f1dc5424f010221f3ce5097cb0
tree2e0f83da7f498e00117d628077f41d52a330314f
parent82855e986453f895e49175c52952ff8f9ff95169
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