Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

kprobes: Remove unneeded warnings from __arm_kprobe_ftrace()

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: 9c89bb8e3272 ("kprobes: treewide: Cleanup the error messages for kprobes")
Cc: stable@vger.kernel.org
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>

+2 -2
+2 -2
kernel/kprobes.c
··· 1144 1144 lockdep_assert_held(&kprobe_mutex); 1145 1145 1146 1146 ret = ftrace_set_filter_ip(ops, (unsigned long)p->addr, 0, 0); 1147 - if (WARN_ONCE(ret < 0, "Failed to arm kprobe-ftrace at %pS (error %d)\n", p->addr, ret)) 1147 + if (ret < 0) 1148 1148 return ret; 1149 1149 1150 1150 if (*cnt == 0) { 1151 1151 ret = register_ftrace_function(ops); 1152 - if (WARN(ret < 0, "Failed to register kprobe-ftrace (error %d)\n", ret)) { 1152 + if (ret < 0) { 1153 1153 /* 1154 1154 * At this point, sinec ops is not registered, we should be sefe from 1155 1155 * registering empty filter.