From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Jiri Olsa <olsajiri@gmail.com>, Oleg Nesterov <oleg@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Sasha Levin <sashal@kernel.org>,
ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org,
eddyz87@gmail.com, shuah@kernel.org, mcoquelin.stm32@gmail.com,
alexandre.torgue@foss.st.com, thinker.li@gmail.com,
martin.lau@kernel.org, geliang@kernel.org, bentiss@kernel.org,
jrife@google.com, alan.maguire@oracle.com, dxu@dxuuu.xyz,
davemarchevsky@fb.com, bpf@vger.kernel.org,
linux-kselftest@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH AUTOSEL 6.11 147/244] selftests/bpf: fix uprobe.path leak in bpf_testmod
Date: Wed, 25 Sep 2024 07:26:08 -0400 [thread overview]
Message-ID: <20240925113641.1297102-147-sashal@kernel.org> (raw)
In-Reply-To: <20240925113641.1297102-1-sashal@kernel.org>
From: Jiri Olsa <olsajiri@gmail.com>
[ Upstream commit db61e6a4eee5a7884b2cafeaf407895f253bbaa7 ]
testmod_unregister_uprobe() forgets to path_put(&uprobe.path).
Signed-off-by: Jiri Olsa <olsajiri@gmail.com>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20240801132724.GA8791@redhat.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c b/tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c
index fd28c1157bd3d..72f565af4f829 100644
--- a/tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c
+++ b/tools/testing/selftests/bpf/bpf_testmod/bpf_testmod.c
@@ -477,6 +477,7 @@ static void testmod_unregister_uprobe(void)
if (uprobe.offset) {
uprobe_unregister(d_real_inode(uprobe.path.dentry),
uprobe.offset, &uprobe.consumer);
+ path_put(&uprobe.path);
uprobe.offset = 0;
}
--
2.43.0
next parent reply other threads:[~2024-09-25 11:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240925113641.1297102-1-sashal@kernel.org>
2024-09-25 11:26 ` Sasha Levin [this message]
2024-09-25 11:27 ` [PATCH AUTOSEL 6.11 236/244] bpf: Make the pointer returned by iter next method valid Sasha Levin
2024-09-25 11:27 ` [PATCH AUTOSEL 6.11 241/244] bpftool: Fix undefined behavior caused by shifting into the sign bit Sasha Levin
2024-09-25 11:27 ` [PATCH AUTOSEL 6.11 243/244] bpftool: Fix undefined behavior in qsort(NULL, 0, ...) Sasha Levin
2024-09-25 11:27 ` [PATCH AUTOSEL 6.11 244/244] bpf: Fix a sdiv overflow issue Sasha Levin
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=20240925113641.1297102-147-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=alan.maguire@oracle.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bentiss@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davemarchevsky@fb.com \
--cc=dxu@dxuuu.xyz \
--cc=eddyz87@gmail.com \
--cc=geliang@kernel.org \
--cc=jrife@google.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=martin.lau@kernel.org \
--cc=mcoquelin.stm32@gmail.com \
--cc=oleg@redhat.com \
--cc=olsajiri@gmail.com \
--cc=peterz@infradead.org \
--cc=shuah@kernel.org \
--cc=stable@vger.kernel.org \
--cc=thinker.li@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox