提交 2e3ac940 编写于 作者: J Josh Poimboeuf 提交者: Jiri Kosina

livepatch: remove unnecessary call to klp_find_object_module()

klp_find_object_module() is called from both the klp register and enable
paths.  Only the call from the register path is necessary because the
module notifier will let us know if the patched module gets loaded or
unloaded.
Signed-off-by: NJosh Poimboeuf <jpoimboe@redhat.com>
Reviewed-by: NPetr Mladek <pmladek@suse.cz>
Signed-off-by: NJiri Kosina <jkosina@suse.cz>
上级 0937e3b0
...@@ -511,8 +511,6 @@ static int __klp_enable_patch(struct klp_patch *patch) ...@@ -511,8 +511,6 @@ static int __klp_enable_patch(struct klp_patch *patch)
pr_notice("enabling patch '%s'\n", patch->mod->name); pr_notice("enabling patch '%s'\n", patch->mod->name);
for (obj = patch->objs; obj->funcs; obj++) { for (obj = patch->objs; obj->funcs; obj++) {
klp_find_object_module(obj);
if (!klp_is_object_loaded(obj)) if (!klp_is_object_loaded(obj))
continue; continue;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册