• Ingo Molnar's avatar
    x86/fpu: Add debug check to kernel_fpu_disable() · 3103ae3a
    Ingo Molnar authored
    We are not supposed to call kernel_fpu_disable() if we have not
    previously enabled it.
    
    Also use kernel_fpu_disable()/enable() in the __kernel_fpu_begin/end()
    primitives, instead of writing to in_kernel_fpu directly,
    so that we get the debugging checks.
    Reviewed-by: default avatarBorislav Petkov <bp@alien8.de>
    Cc: Andy Lutomirski <luto@amacapital.net>
    Cc: Dave Hansen <dave.hansen@linux.intel.com>
    Cc: Fenghua Yu <fenghua.yu@intel.com>
    Cc: H. Peter Anvin <hpa@zytor.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Oleg Nesterov <oleg@redhat.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
    3103ae3a
core.c 15.5 KB