Skip to content

Commit 2e3ac94

Browse files
jpoimboeJiri Kosina
authored andcommitted
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: Josh Poimboeuf <jpoimboe@redhat.com> Reviewed-by: Petr Mladek <pmladek@suse.cz> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
1 parent 0937e3b commit 2e3ac94

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

kernel/livepatch/core.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -511,8 +511,6 @@ static int __klp_enable_patch(struct klp_patch *patch)
511511
pr_notice("enabling patch '%s'\n", patch->mod->name);
512512

513513
for (obj = patch->objs; obj->funcs; obj++) {
514-
klp_find_object_module(obj);
515-
516514
if (!klp_is_object_loaded(obj))
517515
continue;
518516

0 commit comments

Comments
 (0)