hulk inclusion category: bugfix bugzilla: https://atomgit.com/openeuler/kernel/issues/8424 ---------------------------------------- Set the CFTYPE_NOT_ON_ROOT flag for the xcu.stat file. The root cgroup is by default assigned to the RT scheduling class. Since the xcu interface is unavailable for RT tasks, exposing this file at the root level is illogical. Hide the interface at the root cgroup to prevent user confusion and invalid access attempts. Fixes: 43bbefc53356 ("xsched: Add XCU control group implementation and its backend in xsched CFS") Signed-off-by: Liu Kai <liukai284@huawei.com> --- kernel/xsched/cgroup.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/xsched/cgroup.c b/kernel/xsched/cgroup.c index fdaad68b12a6..f8f31a24d1f9 100644 --- a/kernel/xsched/cgroup.c +++ b/kernel/xsched/cgroup.c @@ -801,6 +801,7 @@ static struct cftype xcu_cg_files[] = { }, { .name = "stat", + .flags = CFTYPE_NOT_ON_ROOT, .seq_show = xcu_stat, }, { -- 2.34.1