Skip to content

Commit

Permalink
livepatch: move transition "complete" notice into klp_complete_transi…
Browse files Browse the repository at this point in the history
…tion()

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>
  • Loading branch information
Joe Lawrence authored and Jiri Kosina committed Oct 19, 2017
1 parent 93862e3 commit 6116c30
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kernel/livepatch/transition.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ static void klp_complete_transition(void)
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.
Expand Down Expand Up @@ -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();
}
Expand Down

0 comments on commit 6116c30

Please sign in to comment.