Skip to content

Commit

Permalink
[core] hook: fixed failure to initialize the kprobe struct completely
Browse files Browse the repository at this point in the history
  • Loading branch information
gnif committed Nov 11, 2020
1 parent 69e33e3 commit 4dc9a80
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/ftrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@ Place, Suite 330, Boston, MA 02111-1307 USA
*/
static int resolve_hook_address(struct ftrace_hook *hook)
{
struct kprobe kp;
struct kprobe kp = { .symbol_name = hook->name };

kp.symbol_name = hook->name;
if (register_kprobe(&kp))
{
pr_warn("unresolved symbol %s\n", hook->name);
Expand Down Expand Up @@ -122,4 +121,4 @@ void fh_remove_hooks(struct ftrace_hook *hooks)

for (hook = hooks; hook->name; ++hook)
fh_remove_hook(hook);
}
}

0 comments on commit 4dc9a80

Please sign in to comment.