Skip to content

Commit fa2d8af

Browse files
committed
Merge branch 'for-5.18/fixes' into for-next
2 parents b44a7f0 + 2957308 commit fa2d8af

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

kernel/livepatch/transition.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,13 @@ void klp_force_transition(void)
641641
for_each_possible_cpu(cpu)
642642
klp_update_patch_state(idle_task(cpu));
643643

644-
klp_for_each_patch(patch)
645-
patch->forced = true;
644+
/* Set forced flag for patches being removed. */
645+
if (klp_target_state == KLP_UNPATCHED)
646+
klp_transition_patch->forced = true;
647+
else if (klp_transition_patch->replace) {
648+
klp_for_each_patch(patch) {
649+
if (patch != klp_transition_patch)
650+
patch->forced = true;
651+
}
652+
}
646653
}

0 commit comments

Comments
 (0)