diff options
author | Kui-Feng Lee <[email protected]> | 2024-04-08 10:51:40 -0700 |
---|---|---|
committer | Masami Hiramatsu (Google) <[email protected]> | 2024-05-01 23:18:47 +0900 |
commit | 5120d167e21c674afd0630c65e7f6a00fa0667f1 (patch) | |
tree | 982f06455fc8b5c7c659e351b4039aa16151e03e | |
parent | 73142cab3af1b99157837297f437b306d7a70bff (diff) |
rethook: Remove warning messages printed for finding return address of a frame.
The function rethook_find_ret_addr() prints a warning message and returns 0
when the target task is running and is not the "current" task in order to
prevent the incorrect return address, although it still may return an
incorrect address.
However, the warning message turns into noise when BPF profiling programs
call bpf_get_task_stack() on running tasks in a firm with a large number of
hosts.
The callers should be aware and willing to take the risk of receiving an
incorrect return address from a task that is currently running other than
the "current" one. A warning is not needed here as the callers are intent
on it.
Link: https://lore.kernel.org/all/[email protected]/
Acked-by: Andrii Nakryiko <[email protected]>
Acked-by: John Fastabend <[email protected]>
Signed-off-by: Kui-Feng Lee <[email protected]>
Signed-off-by: Masami Hiramatsu (Google) <[email protected]>
-rw-r--r-- | kernel/trace/rethook.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/trace/rethook.c b/kernel/trace/rethook.c index fa03094e9e69..4297a132a7ae 100644 --- a/kernel/trace/rethook.c +++ b/kernel/trace/rethook.c @@ -248,7 +248,7 @@ unsigned long rethook_find_ret_addr(struct task_struct *tsk, unsigned long frame if (WARN_ON_ONCE(!cur)) return 0; - if (WARN_ON_ONCE(tsk != current && task_is_running(tsk))) + if (tsk != current && task_is_running(tsk)) return 0; do { |