From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Ingo Molnar <mingo@redhat.com>,
Heiko Carstens <hca@linux.ibm.com>, Jiri Olsa <jolsa@kernel.org>
Subject: [for-linus][PATCH 4/5] ftrace: Add cleanup to unregister_ftrace_direct_multi
Date: Thu, 09 Dec 2021 10:29:12 -0500 [thread overview]
Message-ID: <20211209153223.650040623@goodmis.org> (raw)
In-Reply-To: 20211209152908.459494269@goodmis.org
From: Jiri Olsa <jolsa@redhat.com>
Adding ops cleanup to unregister_ftrace_direct_multi,
so it can be reused in another register call.
Link: https://lkml.kernel.org/r/20211206182032.87248-3-jolsa@kernel.org
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Heiko Carstens <hca@linux.ibm.com>
Fixes: f64dd4627ec6 ("ftrace: Add multi direct register/unregister interface")
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
kernel/trace/ftrace.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index 7f0594e28226..be5f6b32a012 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -5542,6 +5542,10 @@ int unregister_ftrace_direct_multi(struct ftrace_ops *ops, unsigned long addr)
err = unregister_ftrace_function(ops);
remove_direct_functions_hash(hash, addr);
mutex_unlock(&direct_mutex);
+
+ /* cleanup for possible another register call */
+ ops->func = NULL;
+ ops->trampoline = 0;
return err;
}
EXPORT_SYMBOL_GPL(unregister_ftrace_direct_multi);
--
2.33.0
next prev parent reply other threads:[~2021-12-09 15:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-09 15:29 [for-linus][PATCH 0/5] tracing: Updates for 5.16-rc5 Steven Rostedt
2021-12-09 15:29 ` [for-linus][PATCH 1/5] tracefs: Have new files inherit the ownership of their parent Steven Rostedt
2021-12-09 15:29 ` [for-linus][PATCH 2/5] tracefs: Set all files to the same group ownership as the mount option Steven Rostedt
2021-12-09 15:29 ` [for-linus][PATCH 3/5] ftrace: Use direct_ops hash in unregister_ftrace_direct Steven Rostedt
2021-12-09 15:29 ` Steven Rostedt [this message]
2021-12-09 15:29 ` [for-linus][PATCH 5/5] ftrace/samples: Add module to test multi direct modify interface Steven Rostedt
2021-12-09 17:50 ` Heiko Carstens
2021-12-09 18:01 ` Steven Rostedt
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=20211209153223.650040623@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=hca@linux.ibm.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mingo@redhat.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.