mirror of
https://github.com/torvalds/linux.git
synced 2026-09-11 20:13:02 +02:00
selftests/cgroup: Fix cg_run_in_subcgroups ignoring arg parameter
cg_run_in_subcgroups() discards its arg and always passes NULL to cg_run(),
turning the (void *)100 from test_kmem_dead_cgroups() into NULL so no
allocation occurs.
This makes test_kmem_dead_cgroups() falsely pass without exercising the
"dying cgroup with charged slab" scenario it intends to test.
Pass the arg through to cg_run() to fix this.
Fixes: 933dc80ec2 ("kselftests: cgroup: add kernel memory accounting tests")
Signed-off-by: Hongfu Li <lihongfu@kylinos.cn>
Reviewed-by: Michal Koutný <mkoutny@suse.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
parent
0c893d170f
commit
a8c6daab4b
|
|
@ -145,7 +145,7 @@ static int cg_run_in_subcgroups(const char *parent,
|
|||
return -1;
|
||||
}
|
||||
|
||||
if (cg_run(child, fn, NULL)) {
|
||||
if (cg_run(child, fn, arg)) {
|
||||
cg_destroy(child);
|
||||
free(child);
|
||||
return -1;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user