]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
livepatch: move transition "complete" notice into klp_complete_transition()
authorJoe Lawrence <joe.lawrence@redhat.com>
Fri, 13 Oct 2017 19:08:42 +0000 (15:08 -0400)
committerJiri Kosina <jkosina@suse.cz>
Thu, 19 Oct 2017 08:09:01 +0000 (10:09 +0200)
klp_complete_transition() performs a bit of housework before a
transition to KLP_PATCHED or KLP_UNPATCHED is actually completed
(including post-(un)patch callbacks).  To be consistent, move the
transition "complete" kernel log notice out of
klp_try_complete_transition() and into klp_complete_transition().

Suggested-by: Josh Poimboeuf <jpoimboe@redhat.com>
Acked-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
Acked-by: Miroslav Benes <mbenes@suse.cz>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
kernel/livepatch/transition.c

index 7bf55b7f36875282157e341f2e30b8fc49a9226f..53887f0bca1021e3c4f5ab20eb42b7da45264f88 100644 (file)
@@ -136,6 +136,9 @@ done:
                        klp_post_unpatch_callback(obj);
        }
 
+       pr_notice("'%s': %s complete\n", klp_transition_patch->mod->name,
+                 klp_target_state == KLP_PATCHED ? "patching" : "unpatching");
+
        /*
         * See complementary comment in __klp_enable_patch() for why we
         * keep the module reference for immediate patches.
@@ -423,9 +426,6 @@ void klp_try_complete_transition(void)
        }
 
 success:
-       pr_notice("'%s': %s complete\n", klp_transition_patch->mod->name,
-                 klp_target_state == KLP_PATCHED ? "patching" : "unpatching");
-
        /* we're done, now cleanup the data structures */
        klp_complete_transition();
 }