diff options
author | Geliang Tang <[email protected]> | 2024-04-09 13:18:40 +0800 |
---|---|---|
committer | Martin KaFai Lau <[email protected]> | 2024-04-11 10:29:25 -0700 |
commit | d75142dbeb2bd1587b9cc19f841578f541275a64 (patch) | |
tree | 5590ecccac81480f8d3ec256d7d554e2055f30b5 | |
parent | ffa6b26b4d8a0520b78636ca9373ab842cb3b1a8 (diff) |
selftests/bpf: Fix umount cgroup2 error in test_sockmap
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: 13a5f3ffd202 ("bpf: Selftests, sockmap test prog run without setting cgroup")
Signed-off-by: Geliang Tang <[email protected]>
Acked-by: Yonghong Song <[email protected]>
Link: https://lore.kernel.org/r/0399983bde729708773416b8488bac2cd5e022b8.1712639568.git.tanggeliang@kylinos.cn
Signed-off-by: Martin KaFai Lau <[email protected]>
-rw-r--r-- | tools/testing/selftests/bpf/test_sockmap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/test_sockmap.c b/tools/testing/selftests/bpf/test_sockmap.c index 024a0faafb3b..43612de44fbf 100644 --- a/tools/testing/selftests/bpf/test_sockmap.c +++ b/tools/testing/selftests/bpf/test_sockmap.c @@ -2104,9 +2104,9 @@ out: free(options.whitelist); if (options.blacklist) free(options.blacklist); + close(cg_fd); if (cg_created) cleanup_cgroup_environment(); - close(cg_fd); return err; } |