Re: [PATCH v4 5/5] livepatch: Clean up klp_init_object_loaded() when fails

From: Miroslav Benes

Date: Fri Sep 18 2026 - 10:19:02 EST


On Tue, 08 Sep 2026 14:03:25 +0200, Petr Mladek <pmladek@xxxxxxxx> wrote:
> When loading a module, klp_module_coming() updates all enabled patches.
> If an error occurs, klp_cleanup_module_patches_limited() cleans up fully
> processed patches, but skips the patch that failed midway.
>
> The current code is a bit messy. The changes done by
> klp_init_object_loaded() should get cleared by klp_free_object_loaded().
> But this function also clears obj->mod which is set by
> klp_module_coming(). And relocations are cleared separately.
>
> [...]

Acked-by: Miroslav Benes <mbenes@xxxxxxx>

--
Miroslav