[core] hook: fixed failure to initialize the kprobe struct completely
This commit is contained in:
parent
69e33e3cb8
commit
4dc9a80657
|
@ -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);
|
||||
|
@ -122,4 +121,4 @@ void fh_remove_hooks(struct ftrace_hook *hooks)
|
|||
|
||||
for (hook = hooks; hook->name; ++hook)
|
||||
fh_remove_hook(hook);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue