Messages in this thread Patch in this message | | | From | Andy Lutomirski <> | Subject | [PATCH] x86_32: Initialize the cr4 shadow on cpu init | Date | Fri, 27 Feb 2015 11:53:39 -0800 |
| |
32-bit secondary cpus had uninitialized cr4 shadows, causing random failures.
Reported-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Andy Lutomirski <luto@amacapital.net> ---
This is embarrassing. I must have gotten lucky testing it.
arch/x86/kernel/cpu/common.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index b5c8ff5e9dfc..2346c95c6ab1 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c @@ -1396,6 +1396,12 @@ void cpu_init(void) wait_for_master_cpu(cpu); + /* + * Initialize the CR4 shadow before doing anything that could + * try to read it. + */ + cr4_init_shadow(); + show_ucode_info_early(); printk(KERN_INFO "Initializing CPU#%d\n", cpu); -- 2.1.0
| |