]> git.baikalelectronics.ru Git - kernel.git/commit
ftrace: Use direct_ops hash in unregister_ftrace_direct
authorJiri Olsa <jolsa@redhat.com>
Mon, 6 Dec 2021 18:20:30 +0000 (19:20 +0100)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Wed, 8 Dec 2021 17:12:02 +0000 (12:12 -0500)
commit5b1f6991e11a8da4dd5acb579b3bb28b0bc3f558
tree5817f644a9a71a690dad2c14a275f4f9cb5e7ff2
parente06c3c3914b24cd897292d7da6086c826dff039c
ftrace: Use direct_ops hash in unregister_ftrace_direct

Now when we have *direct_multi interface the direct_functions
hash is no longer owned just by direct_ops. It's also used by
any other ftrace_ops passed to *direct_multi interface.

Thus to find out that we are unregistering the last function
from direct_ops, we need to check directly direct_ops's hash.

Link: https://lkml.kernel.org/r/20211206182032.87248-2-jolsa@kernel.org
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Heiko Carstens <hca@linux.ibm.com>
Fixes: faafd6ec8857 ("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