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: NYe Weihua <yeweihua4@huawei.com> Reviewed-by: NYang Jihong <yangjihong1@huawei.com> Signed-off-by: NChen Jun <chenjun102@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Showing
想要评论请 注册 或 登录