diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-12-07 16:30:11 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-12-07 16:30:11 -0300 |
commit | 189382f7a338c02b448ab27e1d5566e052165dc8 (patch) | |
tree | 14903209649ee76584b17afa492e31a0c9460c27 /arch/x86/mm/extable.c | |
parent | 62e27076b7a48d1c8fc4eed59ff75f6382915c46 (diff) |
Linux-libre 4.8.12-gnupck-4.8.12-gnu
Diffstat (limited to 'arch/x86/mm/extable.c')
-rw-r--r-- | arch/x86/mm/extable.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/x86/mm/extable.c b/arch/x86/mm/extable.c index 832b98f82..a3a983fd4 100644 --- a/arch/x86/mm/extable.c +++ b/arch/x86/mm/extable.c @@ -135,7 +135,12 @@ void __init early_fixup_exception(struct pt_regs *regs, int trapnr) if (early_recursion_flag > 2) goto halt_loop; - if (regs->cs != __KERNEL_CS) + /* + * Old CPUs leave the high bits of CS on the stack + * undefined. I'm not sure which CPUs do this, but at least + * the 486 DX works this way. + */ + if ((regs->cs & 0xFFFF) != __KERNEL_CS) goto fail; /* |