Merge tag 'livepatching-for-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching
Pull livepatching updates from Petr Mladek: - Forced transitions block only to-be-removed livepatches [Chengming] - Detect when ftrace handler could not be disabled in self-tests [David] - Calm down warning from a static analyzer [Tom] * tag 'livepatching-for-5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching: livepatch: Reorder to use before freeing a pointer livepatch: Don't block removal of patches that are safe to unload livepatch: Skip livepatch tests if ftrace cannot be configured
This commit is contained in:
@@ -641,6 +641,13 @@ void klp_force_transition(void)
|
||||
for_each_possible_cpu(cpu)
|
||||
klp_update_patch_state(idle_task(cpu));
|
||||
|
||||
klp_for_each_patch(patch)
|
||||
patch->forced = true;
|
||||
/* Set forced flag for patches being removed. */
|
||||
if (klp_target_state == KLP_UNPATCHED)
|
||||
klp_transition_patch->forced = true;
|
||||
else if (klp_transition_patch->replace) {
|
||||
klp_for_each_patch(patch) {
|
||||
if (patch != klp_transition_patch)
|
||||
patch->forced = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user