From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: Crystal Wood <crwood@redhat.com>,
Steven Rostedt <rostedt@goodmis.org>,
Sasha Levin <sashal@kernel.org>
Subject: [PATCH 6.1.y 2/2] tracing/osnoise: Call synchronize_rcu() when unregistering
Date: Tue, 28 Jul 2026 23:20:18 -0400 [thread overview]
Message-ID: <20260729032018.1223942-2-sashal@kernel.org> (raw)
In-Reply-To: <20260729032018.1223942-1-sashal@kernel.org>
From: Crystal Wood <crwood@redhat.com>
[ Upstream commit fe58f457ad8d0a2bef4e053cfecca4b5cd266b1a ]
This ensures that any RCU readers traversing the instance list
have finished, before releasing the reference on the tracer that
the instance points to.
Cc: stable@vger.kernel.org
Fixes: a6ed2aee54644 ("tracing: Switch to kvfree_rcu() API")
Link: https://patch.msgid.link/20260609045430.1589786-1-crwood@redhat.com
Suggested-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Crystal Wood <crwood@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
kernel/trace/trace_osnoise.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/kernel/trace/trace_osnoise.c b/kernel/trace/trace_osnoise.c
index 417b62f7550978..3b3f31ca45831b 100644
--- a/kernel/trace/trace_osnoise.c
+++ b/kernel/trace/trace_osnoise.c
@@ -137,7 +137,9 @@ static void osnoise_unregister_instance(struct trace_array *tr)
if (!found)
return;
- kvfree_rcu_mightsleep(inst);
+ /* Do a full sync to ensure that tr remains valid, not just inst */
+ synchronize_rcu();
+ kvfree(inst);
}
/*
--
2.53.0
prev parent reply other threads:[~2026-07-29 3:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-21 9:16 FAILED: patch "[PATCH] tracing/osnoise: Call synchronize_rcu() when unregistering" failed to apply to 6.1-stable tree gregkh
2026-07-29 3:20 ` [PATCH 6.1.y 1/2] tracing: Rename kvfree_rcu() to kvfree_rcu_mightsleep() Sasha Levin
2026-07-29 3:20 ` Sasha Levin [this message]
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=20260729032018.1223942-2-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=crwood@redhat.com \
--cc=rostedt@goodmis.org \
--cc=stable@vger.kernel.org \
/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