Skip to content

Commit c235cef

Browse files
mhiramatopsiff
authored andcommitted
kprobes: Remove unneeded warnings from __arm_kprobe_ftrace()
[ Upstream commit 5ef268cb7a0aac55521fd9881f1939fa94a8988e ] Remove unneeded warnings for handled errors from __arm_kprobe_ftrace() because all caller handled the error correctly. Link: https://lore.kernel.org/all/177261531182.1312989.8737778408503961141.stgit@mhiramat.tok.corp.google.com/ Reported-by: Zw Tang <shicenci@gmail.com> Closes: https://lore.kernel.org/all/CAPHJ_V+J6YDb_wX2nhXU6kh466Dt_nyDSas-1i_Y8s7tqY-Mzw@mail.gmail.com/ Fixes: 9c89bb8 ("kprobes: treewide: Cleanup the error messages for kprobes") Cc: stable@vger.kernel.org Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit 3f04f871a1d4c688dbcedbe2583f69012f11242b) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
1 parent cf89016 commit c235cef

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

kernel/kprobes.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,12 +1078,12 @@ static int __arm_kprobe_ftrace(struct kprobe *p, struct ftrace_ops *ops,
10781078
lockdep_assert_held(&kprobe_mutex);
10791079

10801080
ret = ftrace_set_filter_ip(ops, (unsigned long)p->addr, 0, 0);
1081-
if (WARN_ONCE(ret < 0, "Failed to arm kprobe-ftrace at %pS (error %d)\n", p->addr, ret))
1081+
if (ret < 0)
10821082
return ret;
10831083

10841084
if (*cnt == 0) {
10851085
ret = register_ftrace_function(ops);
1086-
if (WARN(ret < 0, "Failed to register kprobe-ftrace (error %d)\n", ret)) {
1086+
if (ret < 0) {
10871087
/*
10881088
* At this point, sinec ops is not registered, we should be sefe from
10891089
* registering empty filter.

0 commit comments

Comments
 (0)