[core] hook: fixed failure to initialize the kprobe struct completely

This commit is contained in:
Geoffrey McRae 2020-11-11 11:24:42 +11:00
parent 69e33e3cb8
commit 4dc9a80657

View File

@ -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);