mirror of
https://github.com/dynup/kpatch
synced 2024-12-24 14:12:06 +00:00
Merge pull request #317 from jpoimboe/module-old-addr-fix
kmod/core: module old_addr fix
This commit is contained in:
commit
1c8e8a7d57
@ -720,9 +720,15 @@ static int kpatch_link_object(struct kpatch_module *kpmod,
|
||||
old_addr);
|
||||
if (ret)
|
||||
goto err_unlink;
|
||||
} else
|
||||
old_addr = (unsigned long)mod->module_core +
|
||||
func->old_offset;
|
||||
} else {
|
||||
old_addr = kpatch_find_module_symbol(mod, func->name);
|
||||
if (!old_addr) {
|
||||
pr_err("unable to find symbol '%s' in module '%s\n",
|
||||
func->name, mod->name);
|
||||
ret = -EINVAL;
|
||||
goto err_unlink;
|
||||
}
|
||||
}
|
||||
|
||||
/* add to ftrace filter and register handler if needed */
|
||||
ret = kpatch_ftrace_add_func(old_addr);
|
||||
|
Loading…
Reference in New Issue
Block a user