diff options
author | Max Kellermann <[email protected]> | 2023-12-08 10:33:09 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2023-12-15 17:22:40 +0100 |
commit | fe3de0102bc830e78d80dbf6e2dd29c520d68575 (patch) | |
tree | fd1edfbf38c013c5a70cfe79947e89d3a744791d /lib/test_fortify/write_overflow-strlcpy-src.c | |
parent | 7c23fb2e6e3b40db5abbead64842060f13c4bb15 (diff) |
kernel/cgroup: use kernfs_create_dir_ns()
By passing the fsugid to kernfs_create_dir_ns(), we don't need
cgroup_kn_set_ugid() any longer. That function was added for exactly
this purpose by commit 49957f8e2a43 ("cgroup: newly created dirs and
files should be owned by the creator").
Eliminating this piece of duplicate code means we benefit from future
improvements to kernfs_create_dir_ns(); for example, both are lacking
S_ISGID support currently, which my next patch will add to
kernfs_create_dir_ns(). It cannot (easily) be added to
cgroup_kn_set_ugid() because we can't dereference struct kernfs_iattrs
from there.
--
v1 -> v2: 12-digit commit id
Signed-off-by: Max Kellermann <[email protected]>
Acked-by: Tejun Heo <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strlcpy-src.c')
0 files changed, 0 insertions, 0 deletions