tracing/kprobe: Fix kprobe_on_func_entry() modification
authorLi Huafei <lihuafei1@huawei.com>
Fri, 24 Sep 2021 02:54:48 +0000 (10:54 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 26 Sep 2021 11:39:47 +0000 (13:39 +0200)
commit6cfbbb961bb94de85455fe35140b1350c7ccb76c
tree562d7ecf04971d9d0a1d03f807f01e699347bceb
parent320dc471c471500d61c98380395f8f54aa4add7f
tracing/kprobe: Fix kprobe_on_func_entry() modification

The commit 960434acef37 ("tracing/kprobe: Fix to support kretprobe
events on unloaded modules") backport from v5.11, which modifies the
return value of kprobe_on_func_entry(). However, there is no adaptation
modification in create_trace_kprobe(), resulting in the exact opposite
behavior. Now we need to return an error immediately only if
kprobe_on_func_entry() returns -EINVAL.

Fixes: 960434acef37 ("tracing/kprobe: Fix to support kretprobe events on unloaded modules")
Signed-off-by: Li Huafei <lihuafei1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/trace/trace_kprobe.c