From: Hou Tao Date: Wed, 21 Sep 2022 07:00:34 +0000 (+0800) Subject: selftests/bpf: Destroy the skeleton when CONFIG_PREEMPT is off X-Git-Tag: v6.6.17~6504^2~10^2~29^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f5eb23b91c41a7ffc7ca7fe14f3c512360f02937;p=platform%2Fkernel%2Flinux-rpi.git 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 Link: https://lore.kernel.org/r/20220921070035.2016413-2-houtao@huaweicloud.com Signed-off-by: Martin KaFai Lau --- 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 aac08c8..7d05036 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; }