https://github.com/torvalds/linux
Revision 61b304b73ab4b48b1cd7796efe42a570e2a0e0fc authored by Masami Hiramatsu (Google) on 23 October 2022, 02:11:43 UTC, committed by Masami Hiramatsu (Google) on 03 November 2022, 23:50:07 UTC
Since commit ab51e15d535e ("fprobe: Introduce FPROBE_FL_KPROBE_SHARED flag
for fprobe") introduced fprobe_kprobe_handler() for fprobe::ops::func,
unregister_fprobe() fails to unregister the registered if user specifies
FPROBE_FL_KPROBE_SHARED flag.
Moreover, __register_ftrace_function() is possible to change the
ftrace_ops::func, thus we have to check fprobe::ops::saved_func instead.

To check it correctly, it should confirm the fprobe::ops::saved_func is
either fprobe_handler() or fprobe_kprobe_handler().

Link: https://lore.kernel.org/all/166677683946.1459107.15997653945538644683.stgit@devnote3/

Fixes: cad9931f64dc ("fprobe: Add ftrace based probe APIs")
Cc: stable@vger.kernel.org
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
1 parent d05ea35
History
Tip revision: 61b304b73ab4b48b1cd7796efe42a570e2a0e0fc authored by Masami Hiramatsu (Google) on 23 October 2022, 02:11:43 UTC
tracing/fprobe: Fix to check whether fprobe is registered correctly
Tip revision: 61b304b
File Mode Size
Documentation
LICENSES
arch
block
certs
crypto
drivers
fs
include
init
io_uring
ipc
kernel
lib
mm
net
rust
samples
scripts
security
sound
tools
usr
virt
.clang-format -rw-r--r-- 19.9 KB
.cocciconfig -rw-r--r-- 59 bytes
.get_maintainer.ignore -rw-r--r-- 151 bytes
.gitattributes -rw-r--r-- 62 bytes
.gitignore -rw-r--r-- 2.0 KB
.mailmap -rw-r--r-- 24.2 KB
.rustfmt.toml -rw-r--r-- 369 bytes
COPYING -rw-r--r-- 496 bytes
CREDITS -rw-r--r-- 99.1 KB
Kbuild -rw-r--r-- 2.5 KB
Kconfig -rw-r--r-- 555 bytes
MAINTAINERS -rw-r--r-- 671.3 KB
Makefile -rw-r--r-- 69.0 KB
README -rw-r--r-- 727 bytes

README

back to top