diff options
author | 2025-05-21 08:42:51 +0200 | |
---|---|---|
committer | 2025-05-21 08:45:03 +0200 | |
commit | 412751aa6991501d7defeadecfede59043d1b5e8 (patch) | |
tree | ee5026e79128dd4eacb935f76564d7dcc105b24f /arch/x86/kernel/alternative.c | |
parent | x86/xen/msr: Fix uninitialized variable 'err' (diff) | |
parent | Linux 6.15-rc7 (diff) | |
download | wireguard-linux-412751aa6991501d7defeadecfede59043d1b5e8.tar.xz wireguard-linux-412751aa6991501d7defeadecfede59043d1b5e8.zip |
Merge tag 'v6.15-rc7' into x86/core, to pick up fixes
Pick up build fixes from upstream to make this tree more testable.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/kernel/alternative.c')
-rw-r--r-- | arch/x86/kernel/alternative.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c index f3c68b586a95..ecfe7b497cad 100644 --- a/arch/x86/kernel/alternative.c +++ b/arch/x86/kernel/alternative.c @@ -111,7 +111,9 @@ static bool cfi_paranoid __ro_after_init; #ifdef CONFIG_MITIGATION_ITS +#ifdef CONFIG_MODULES static struct module *its_mod; +#endif static void *its_page; static unsigned int its_offset; @@ -149,6 +151,7 @@ static void *its_init_thunk(void *thunk, int reg) return thunk + offset; } +#ifdef CONFIG_MODULES void its_init_mod(struct module *mod) { if (!cpu_feature_enabled(X86_FEATURE_INDIRECT_THUNK_ITS)) @@ -187,6 +190,7 @@ void its_free_mod(struct module *mod) } kfree(mod->its_page_array); } +#endif /* CONFIG_MODULES */ static void *its_alloc(void) { @@ -195,6 +199,7 @@ static void *its_alloc(void) if (!page) return NULL; +#ifdef CONFIG_MODULES if (its_mod) { void *tmp = krealloc(its_mod->its_page_array, (its_mod->its_num_pages+1) * sizeof(void *), @@ -207,6 +212,7 @@ static void *its_alloc(void) execmem_make_temp_rw(page, PAGE_SIZE); } +#endif /* CONFIG_MODULES */ return no_free_ptr(page); } |