mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-28 12:53:14 +01:00
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.
Link: https://lore.kernel.org/[email protected]
Fixes: 044d2aee6c ("alloc_tag: handle module codetag load errors as module load failures")
Signed-off-by: Hao Ge <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Reported-by: Sashiko <[email protected]>
Suggested-by: Petr Pavlu <[email protected]>
Reviewed-by: Bradley Morgan <[email protected]>
Cc: Aaron Tomlin <[email protected]>
Cc: Luis Chamberalin <[email protected]>
Cc: Sami Tolvanen <[email protected]>
Cc: Suren Baghdasaryan <[email protected]>
Cc: <[email protected]>