diff options
author | Hou Tao <houtao1@huawei.com> | 2022-09-21 15:00:34 +0800 |
---|---|---|
committer | Martin KaFai Lau <martin.lau@kernel.org> | 2022-09-22 16:41:27 -0700 |
commit | f5eb23b91c41a7ffc7ca7fe14f3c512360f02937 (patch) | |
tree | 677bbc203300071dd695026cf5e2a14fef4335e7 /tools/testing/selftests/bpf/map_tests | |
parent | b780d1671cf933caa3f67160f73261f10750f1a9 (diff) |
selftests/bpf: Destroy the skeleton when CONFIG_PREEMPT is off
Destroy the created skeleton when CONFIG_PREEMPT is off, else will be
resource leak.
Fixes: 73b97bc78b32 ("selftests/bpf: Test concurrent updates on bpf_task_storage_busy")
Signed-off-by: Hou Tao <houtao1@huawei.com>
Link: https://lore.kernel.org/r/20220921070035.2016413-2-houtao@huaweicloud.com
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/map_tests')
-rw-r--r-- | tools/testing/selftests/bpf/map_tests/task_storage_map.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/map_tests/task_storage_map.c b/tools/testing/selftests/bpf/map_tests/task_storage_map.c index aac08c85240b..7d050364efca 100644 --- a/tools/testing/selftests/bpf/map_tests/task_storage_map.c +++ b/tools/testing/selftests/bpf/map_tests/task_storage_map.c @@ -79,6 +79,7 @@ void test_task_storage_map_stress_lookup(void) /* Only for a fully preemptible kernel */ if (!skel->kconfig->CONFIG_PREEMPT) { printf("%s SKIP (no CONFIG_PREEMPT)\n", __func__); + read_bpf_task_storage_busy__destroy(skel); skips++; return; } |