Skip to content

Commit

Permalink
livepatch: remove unnecessary call to klp_find_object_module()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Josh Poimboeuf authored and Jiri Kosina committed Mar 4, 2015
1 parent 0937e3b commit 2e3ac94
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions kernel/livepatch/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -511,8 +511,6 @@ static int __klp_enable_patch(struct klp_patch *patch)
pr_notice("enabling patch '%s'\n", patch->mod->name);

for (obj = patch->objs; obj->funcs; obj++) {
klp_find_object_module(obj);

if (!klp_is_object_loaded(obj))
continue;

Expand Down

0 comments on commit 2e3ac94

Please sign in to comment.