Skip to content

Commit 6116c30

Browse files
joe-lawrenceJiri Kosina
authored andcommitted
livepatch: move transition "complete" notice into klp_complete_transition()
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 <[email protected]> Acked-by: Josh Poimboeuf <[email protected]> Signed-off-by: Joe Lawrence <[email protected]> Acked-by: Miroslav Benes <[email protected]> Reviewed-by: Petr Mladek <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 93862e3 commit 6116c30

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

kernel/livepatch/transition.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,9 @@ static void klp_complete_transition(void)
136136
klp_post_unpatch_callback(obj);
137137
}
138138

139+
pr_notice("'%s': %s complete\n", klp_transition_patch->mod->name,
140+
klp_target_state == KLP_PATCHED ? "patching" : "unpatching");
141+
139142
/*
140143
* See complementary comment in __klp_enable_patch() for why we
141144
* keep the module reference for immediate patches.
@@ -423,9 +426,6 @@ void klp_try_complete_transition(void)
423426
}
424427

425428
success:
426-
pr_notice("'%s': %s complete\n", klp_transition_patch->mod->name,
427-
klp_target_state == KLP_PATCHED ? "patching" : "unpatching");
428-
429429
/* we're done, now cleanup the data structures */
430430
klp_complete_transition();
431431
}

0 commit comments

Comments
 (0)