Hi Daniel

On 2026/9/8 03:42, Daniel Gomez wrote:
> 
> 
> On 2026-08-27T11:05:03+08:00, Hao Ge <[email protected]> wrote:
>> If codetag_load_module() fails, err is not set to reflect the failure
>> and load_module() returns 0 after the module has been torn down.
>>
>> Also, if the module is a livepatch, mod->klp_info allocated by
>> copy_module_elf() leaks on this error path. Free it via a new
>> livepatch_cleanup label.
>>
>> Fixes: 044d2aee6c57 ("alloc_tag: handle module codetag load errors as module 
>> load failures")
>> Reported-by: Sashiko <[email protected]>
>> Suggested-by: Petr Pavlu <[email protected]>
>> Reviewed-by: Bradley Morgan <[email protected]>
>> Cc: [email protected]
>> Signed-off-by: Hao Ge <[email protected]>
> 
> We need the unwind from codetag_unload_module() as reported by sashiko.
> 

Thanks for you review.

I skipped it because alloc_tag is the only codetag type and it
already cleans up after itself.

With a second codetag type the problem Sashiko reported could indeed
be triggered.

My thinking at the time was to do it in codetag itself, as a separate patch,
since it feels odd to unload something whose load just failed.

Happy to hear your thoughts on this.

Thanks
Best Regards
Hao
     
> With that,
> 
> Reviewed-by: Daniel Gomez <[email protected]>
> 
> 

Reply via email to