All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hou Tao <houtao@huaweicloud.com>
To: bpf@vger.kernel.org
Cc: Martin KaFai Lau <kafai@fb.com>,
	Andrii Nakryiko <andrii@kernel.org>,
	Song Liu <songliubraving@fb.com>, Hao Luo <haoluo@google.com>,
	Yonghong Song <yhs@fb.com>, Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	KP Singh <kpsingh@kernel.org>,
	"David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Stanislav Fomichev <sdf@google.com>, Jiri Olsa <jolsa@kernel.org>,
	John Fastabend <john.fastabend@gmail.com>,
	Lorenz Bauer <oss@lmb.io>,
	houtao1@huawei.com
Subject: [PATCH bpf-next v2 0/2] Fix resource leaks in test_maps
Date: Wed, 21 Sep 2022 15:00:33 +0800	[thread overview]
Message-ID: <20220921070035.2016413-1-houtao@huaweicloud.com> (raw)

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


             reply	other threads:[~2022-09-21  6:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-21  7:00 Hou Tao [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220921070035.2016413-1-houtao@huaweicloud.com \
    --to=houtao@huaweicloud.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=haoluo@google.com \
    --cc=houtao1@huawei.com \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kafai@fb.com \
    --cc=kpsingh@kernel.org \
    --cc=kuba@kernel.org \
    --cc=oss@lmb.io \
    --cc=sdf@google.com \
    --cc=songliubraving@fb.com \
    --cc=yhs@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.