mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 07:38:10 +00:00
selftests/bpf: Fix umount cgroup2 error in test_sockmap
[ Upstream commitd75142dbeb
] This patch fixes the following "umount cgroup2" error in test_sockmap.c: (cgroup_helpers.c:353: errno: Device or resource busy) umount cgroup2 Cgroup fd cg_fd should be closed before cleanup_cgroup_environment(). Fixes:13a5f3ffd2
("bpf: Selftests, sockmap test prog run without setting cgroup") Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn> Acked-by: Yonghong Song <yonghong.song@linux.dev> Link: https://lore.kernel.org/r/0399983bde729708773416b8488bac2cd5e022b8.1712639568.git.tanggeliang@kylinos.cn Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
dd52e3bc4f
commit
7a4d18a27d
1 changed files with 1 additions and 1 deletions
|
@ -2014,9 +2014,9 @@ int main(int argc, char **argv)
|
|||
free(options.whitelist);
|
||||
if (options.blacklist)
|
||||
free(options.blacklist);
|
||||
close(cg_fd);
|
||||
if (cg_created)
|
||||
cleanup_cgroup_environment();
|
||||
close(cg_fd);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue