-
由 Yang Xu 提交于
stable inclusion from stable-v5.10.137 commit 60a8f0e62aeb1a50383ab228f2281047bceadd9a category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I60PLB Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=60a8f0e62aeb1a50383ab228f2281047bceadd9a -------------------------------- commit ac6800e2 upstream. All creation paths except for O_TMPFILE handle umask in the vfs directly if the filesystem doesn't support or enable POSIX ACLs. If the filesystem does then umask handling is deferred until posix_acl_create(). Because, O_TMPFILE misses umask handling in the vfs it will not honor umask settings. Fix this by adding the missing umask handling. Link: https://lore.kernel.org/r/1657779088-2242-2-git-send-email-xuyang2018.jy@fujitsu.com Fixes: 60545d0d ("[O_TMPFILE] it's still short a few helpers, but infrastructure should be OK now...") Cc: <stable@vger.kernel.org> # 4.19+ Reported-by: NChristian Brauner (Microsoft) <brauner@kernel.org> Reviewed-by: NDarrick J. Wong <djwong@kernel.org> Reviewed-and-Tested-by: NJeff Layton <jlayton@kernel.org> Acked-by: NChristian Brauner (Microsoft) <brauner@kernel.org> Signed-off-by: NYang Xu <xuyang2018.jy@fujitsu.com> Signed-off-by: NChristian Brauner (Microsoft) <brauner@kernel.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com> Reviewed-by: NWei Li <liwei391@huawei.com>
b29b2348