Commit ec9fee79 authored by Enze Li's avatar Enze Li Committed by Huacai Chen

kfence: Defer the assignment of the local variable addr

The LoongArch architecture is different from other architectures. It
needs to update __kfence_pool during arch_kfence_init_pool().

This patch modifies the assignment location of the local variable addr
in the kfence_init_pool() function to support the case of updating
__kfence_pool in arch_kfence_init_pool().
Acked-by: default avatarMarco Elver <elver@google.com>
Signed-off-by: default avatarEnze Li <lienze@kylinos.cn>
Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
parent 2363088e
......@@ -566,13 +566,14 @@ static void rcu_guarded_free(struct rcu_head *h)
*/
static unsigned long kfence_init_pool(void)
{
unsigned long addr = (unsigned long)__kfence_pool;
unsigned long addr;
struct page *pages;
int i;
if (!arch_kfence_init_pool())
return addr;
return (unsigned long)__kfence_pool;
addr = (unsigned long)__kfence_pool;
pages = virt_to_page(__kfence_pool);
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment