BPF List
 help / color / mirror / Atom feed
* [PATCH bpf-next v2 0/2] Fix resource leaks in test_maps
@ 2022-09-21  7:00 Hou Tao
  2022-09-21  7:00 ` [PATCH bpf-next v2 1/2] selftests/bpf: Destroy the skeleton when CONFIG_PREEMPT is off Hou Tao
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Hou Tao @ 2022-09-21  7:00 UTC (permalink / raw)
  To: bpf
  Cc: Martin KaFai Lau, Andrii Nakryiko, Song Liu, Hao Luo,
	Yonghong Song, Alexei Starovoitov, Daniel Borkmann, KP Singh,
	David S . Miller, Jakub Kicinski, Stanislav Fomichev, Jiri Olsa,
	John Fastabend, Lorenz Bauer, houtao1

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(-)

-- 
2.29.2


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-09-22 23:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-21  7:00 [PATCH bpf-next v2 0/2] Fix resource leaks in test_maps Hou Tao
2022-09-21  7:00 ` [PATCH bpf-next v2 1/2] selftests/bpf: Destroy the skeleton when CONFIG_PREEMPT is off Hou Tao
2022-09-21  7:00 ` [PATCH bpf-next v2 2/2] selftests/bpf: Free the allocated resources after test case succeeds Hou Tao
2022-09-22 23:50 ` [PATCH bpf-next v2 0/2] Fix resource leaks in test_maps patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox