selftests/bpf: Destroy the skeleton when CONFIG_PREEMPT is off
authorHou Tao <houtao1@huawei.com>
Wed, 21 Sep 2022 07:00:34 +0000 (15:00 +0800)
committerMartin KaFai Lau <martin.lau@kernel.org>
Thu, 22 Sep 2022 23:41:27 +0000 (16:41 -0700)
commitf5eb23b91c41a7ffc7ca7fe14f3c512360f02937
tree677bbc203300071dd695026cf5e2a14fef4335e7
parentb780d1671cf933caa3f67160f73261f10750f1a9
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>
tools/testing/selftests/bpf/map_tests/task_storage_map.c