Home
last modified time | relevance | path

Searched hist:"24 a81759" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/fs/cachefiles/
H A Dnamei.c24a81759 Sat Sep 24 00:00:00 CDT 2022 Miklos Szeredi <mszeredi@redhat.com> cachefiles: use vfs_tmpfile_open() helper

Use the vfs_tmpfile_open() helper instead of doing tmpfile creation and
opening separately.

The only minor difference is that previously no permission checking was
done, while vfs_tmpfile_open() will call may_open() with zero access mask
(i.e. no access is checked). Even if this would make a difference with
callers caps (don't see how it could, even in the LSM codepaths) cachfiles
raises caps before performing the tmpfile creation, so this extra
permission check will not result in any regression.

Reviewed-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>