livepatch: remove unnecessary call to klp_find_object_module()
authorJosh Poimboeuf <jpoimboe@redhat.com>
Tue, 3 Mar 2015 23:02:21 +0000 (17:02 -0600)
committerJiri Kosina <jkosina@suse.cz>
Wed, 4 Mar 2015 21:47:47 +0000 (22:47 +0100)
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>
kernel/livepatch/core.c

index 26df09d..d03d613 100644 (file)
@@ -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;