[PATCH] x86/fpu/xstate: Export fpu_fpregs_owner_ctx

From: Yu-cheng Yu
Date: Fri Dec 06 2019 - 18:29:13 EST


After applying my "Invalidate fpregs when __fpu_restore_sig() fails"
patch [1], the following happens:

ERROR: "fpu_fpregs_owner_ctx" [arch/x86/kvm/kvm.ko] undefined!

Fix it by exporting the symbol. I apologize for missing this!

[1] https://lkml.kernel.org/r/20191205182648.32257-4-yu-cheng.yu@xxxxxxxxx/

Signed-off-by: Yu-cheng Yu <yu-cheng.yu@xxxxxxxxx>
---
arch/x86/kernel/fpu/core.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/x86/kernel/fpu/core.c b/arch/x86/kernel/fpu/core.c
index 743ff5ea4076..4e5151e43a2c 100644
--- a/arch/x86/kernel/fpu/core.c
+++ b/arch/x86/kernel/fpu/core.c
@@ -42,6 +42,7 @@ static DEFINE_PER_CPU(bool, in_kernel_fpu);
* Track which context is using the FPU on the CPU:
*/
DEFINE_PER_CPU(struct fpu *, fpu_fpregs_owner_ctx);
+EXPORT_SYMBOL_GPL(fpu_fpregs_owner_ctx);

static bool kernel_fpu_disabled(void)
{
--
2.17.1