aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/traps.c
diff options
context:
space:
mode:
authorBrian Gerst <brgerst@gmail.com>2009-02-10 09:51:45 -0500
committerIngo Molnar <mingo@elte.hu>2009-02-11 12:40:44 +0100
commitaa78bcfa01dec3cdbde3cda098ce32abbd9c3bf6 (patch)
tree5d2e32593345401ffc875060a5368fea63aea6de /arch/x86/kernel/traps.c
parentstackprotector: fix multi-word cross-builds (diff)
downloadlinux-dev-aa78bcfa01dec3cdbde3cda098ce32abbd9c3bf6.tar.xz
linux-dev-aa78bcfa01dec3cdbde3cda098ce32abbd9c3bf6.zip
x86: use pt_regs pointer in do_device_not_available()
The generic exception handler (error_code) passes in the pt_regs pointer and the error code (unused in this case). The commit "x86: fix math_emu register frame access" changed this to pass by value, which doesn't work correctly with stack protector enabled. Change it back to use the pt_regs pointer. Signed-off-by: Brian Gerst <brgerst@gmail.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/traps.c')
-rw-r--r--arch/x86/kernel/traps.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index 3b7b2e190201..71a8f871331e 100644
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -905,19 +905,20 @@ void math_emulate(struct math_emu_info *info)
}
#endif /* CONFIG_MATH_EMULATION */
-dotraplinkage void __kprobes do_device_not_available(struct pt_regs regs)
+dotraplinkage void __kprobes
+do_device_not_available(struct pt_regs *regs, long error_code)
{
#ifdef CONFIG_X86_32
if (read_cr0() & X86_CR0_EM) {
struct math_emu_info info = { };
- conditional_sti(&regs);
+ conditional_sti(regs);
- info.regs = &regs;
+ info.regs = regs;
math_emulate(&info);
} else {
math_state_restore(); /* interrupts still off */
- conditional_sti(&regs);
+ conditional_sti(regs);
}
#else
math_state_restore();