Commit fd55c0ad authored by Kamalesh Babulal's avatar Kamalesh Babulal Committed by Tejun Heo

cgroup: Check for ret during cgroup1_base_files cft addition

There is no check for possible failure while populating
cgroup1_base_files cft in css_populate_dir(), like its cgroup v2 counter
parts cgroup_{base,psi}_files.  In case of failure, the cgroup might not
be set up right.  Add ret value check to return on failure.
Signed-off-by: default avatarKamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent ce9ecca0
......@@ -1731,8 +1731,10 @@ static int css_populate_dir(struct cgroup_subsys_state *css)
return ret;
}
} else {
cgroup_addrm_files(css, cgrp,
cgroup1_base_files, true);
ret = cgroup_addrm_files(css, cgrp,
cgroup1_base_files, true);
if (ret < 0)
return ret;
}
} else {
list_for_each_entry(cfts, &css->ss->cfts, node) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment