提交 fcc541d2 编写于 作者: W Wang ShaoBo 提交者: Yang Yingliang

livepatch/core: Fix compile error when CONFIG_JUMP_LABEL closed

hulk inclusion
category: bugfix
bugzilla: 28338/31814
CVE: NA

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

CONFIG_JUMP_LABEL depends on CC_HAS_ASM_GOTO, some older
compiler may not support.

if CONFIG_JUMP_LABEL closed, compile error as follow:

    kernel/livepatch/core.c: In function ‘klp_init_object_loaded’:
    kernel/livepatch/core.c:1084:2: error: implicit declaration of
    function ‘jump_label_register’ [-Werror=implicit-function-declaration]
    ret = jump_label_register(patch->mod);
        ^

Fixes: 4a7e5316 ("livepatch/core: support jump_label")
Signed-off-by: NWang ShaoBo <bobo.shaobowang@huawei.com>
Reviewed-by: NCheng Jian <cj.chengjian@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 97c844e0
......@@ -240,6 +240,11 @@ static inline int jump_label_apply_nops(struct module *mod)
return 0;
}
static inline int jump_label_register(struct module *mod)
{
return 0;
}
static inline void static_key_enable(struct static_key *key)
{
STATIC_KEY_CHECK_USE(key);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册