Message ID | 20220921070035.2016413-1-houtao@huaweicloud.com (mailing list archive) |
---|---|
Headers | show |
Series | Fix resource leaks in test_maps | expand |
Hello: This series was applied to bpf/bpf-next.git (master) by Martin KaFai Lau <martin.lau@kernel.org>: On Wed, 21 Sep 2022 15:00:33 +0800 you wrote: > From: Hou Tao <houtao1@huawei.com> > > Hi, > > It is just a tiny patch set aims to fix the resource leaks in test_maps > after test case succeeds or is skipped. And these leaks are spotted by > using address sanitizer and checking the content of /proc/$pid/fd. > > [...] Here is the summary with links: - [bpf-next,v2,1/2] selftests/bpf: Destroy the skeleton when CONFIG_PREEMPT is off https://git.kernel.org/bpf/bpf-next/c/f5eb23b91c41 - [bpf-next,v2,2/2] selftests/bpf: Free the allocated resources after test case succeeds https://git.kernel.org/bpf/bpf-next/c/103d002fb7d5 You are awesome, thank you!
From: Hou Tao <houtao1@huawei.com> Hi, It is just a tiny patch set aims to fix the resource leaks in test_maps after test case succeeds or is skipped. And these leaks are spotted by using address sanitizer and checking the content of /proc/$pid/fd. Please see indiviual patch for more details. Change Log: v2: * Add the missing header file unistd.h for close() (From kernel-patches/bpf) The reason Why I miss that is that -Werror is removed from Makefile when enabling clang address sanitizer. v1: * https://lore.kernel.org/bpf/20220921025855.115463-1-houtao@huaweicloud.com/T/ Hou Tao (2): selftests/bpf: Destroy the skeleton when CONFIG_PREEMPT is off selftests/bpf: Free the allocated resources after test case succeeds .../bpf/map_tests/array_map_batch_ops.c | 2 ++ .../bpf/map_tests/htab_map_batch_ops.c | 2 ++ .../bpf/map_tests/lpm_trie_map_batch_ops.c | 2 ++ .../bpf/map_tests/task_storage_map.c | 1 + tools/testing/selftests/bpf/test_maps.c | 24 ++++++++++++------- 5 files changed, 22 insertions(+), 9 deletions(-)