[PATCH 0/2] livepatch: Clear relocations when klp_init_object_loaded() fails

From: Petr Mladek

Date: Fri Aug 28 2026 - 08:53:14 EST


Hi,

this patchset fixes an older problem found by Sashiko AI,
see https://lore.kernel.org/r/20260823062313.1321B1F000E9@xxxxxxxxxxxxxxx

The first patch just shuffles the existing code.
The second patch is the real fix.

The patchset is made on top of the patch where Sashiko found
this older problem, see
https://lore.kernel.org/all/20260823060734.58443-1-x90613@xxxxxxxxx/

It might make sense to handle them together in a single patchset
because they touch the same code and conflict.

It seems that we will need v3 for the original patch.
Harry, could you please send it together with these additional fixes? [*]

[*] I am not sure if you did this before. It is easy. You create
the patchset as usual and send it. git will do the trick
and keep me as the author of the two additional patches.

Alternatively, I could send this separately and solve
the conflicts when merging. They are simple after all.
I just must not forget to replace the new "return err"
with "goto err" ;-)


Petr Mladek (2):
livepatch: Move code for updating livepatch object relocations
livepatch: Clean up klp_init_object_loaded() when fails

kernel/livepatch/core.c | 102 ++++++++++++++++++++++------------------
1 file changed, 56 insertions(+), 46 deletions(-)

--
2.55.0