Commit 0a6cfcc1 authored by Ye Weihua's avatar Ye Weihua Committed by Zheng Zengkai
Browse files

livepatch: move arch_klp_mem_recycle after the return value judgment

hulk inclusion
category: bugfix
bugzilla: 176976 https://gitee.com/openeuler/kernel/issues/I4DDEL



--------------------------------

Before enable a livepatch, we apply for a piece of memory for func_node to
store function information and release it after disable this livepatch.

However, in some special cases, for example, the livepatch code is running,
disable fails. In these cases, the applied memory should not be released.
Otherwise, the livepatch cannot be disabled.

So, we move arch_klp_mem_recycle after the return value judgment to solve
this problem.

Fixes: ec7ce700674f ("livepatch: put memory alloc and free out stop machine")
Signed-off-by: default avatarYe Weihua <yeweihua4@huawei.com>
Reviewed-by: default avatarYang Jihong <yangjihong1@huawei.com>
Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 71d8599d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment