diff options
author | Brian Gerst <brgerst@gmail.com> | 2009-02-10 09:51:45 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-11 06:40:44 -0500 |
commit | aa78bcfa01dec3cdbde3cda098ce32abbd9c3bf6 (patch) | |
tree | 5d2e32593345401ffc875060a5368fea63aea6de /arch/x86/kernel | |
parent | ebd9026d9f8499abc60d82d949bd37f88fe34a41 (diff) |
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')
-rw-r--r-- | arch/x86/kernel/traps.c | 9 |
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) | |||
905 | } | 905 | } |
906 | #endif /* CONFIG_MATH_EMULATION */ | 906 | #endif /* CONFIG_MATH_EMULATION */ |
907 | 907 | ||
908 | dotraplinkage void __kprobes do_device_not_available(struct pt_regs regs) | 908 | dotraplinkage void __kprobes |
909 | do_device_not_available(struct pt_regs *regs, long error_code) | ||
909 | { | 910 | { |
910 | #ifdef CONFIG_X86_32 | 911 | #ifdef CONFIG_X86_32 |
911 | if (read_cr0() & X86_CR0_EM) { | 912 | if (read_cr0() & X86_CR0_EM) { |
912 | struct math_emu_info info = { }; | 913 | struct math_emu_info info = { }; |
913 | 914 | ||
914 | conditional_sti(®s); | 915 | conditional_sti(regs); |
915 | 916 | ||
916 | info.regs = ®s; | 917 | info.regs = regs; |
917 | math_emulate(&info); | 918 | math_emulate(&info); |
918 | } else { | 919 | } else { |
919 | math_state_restore(); /* interrupts still off */ | 920 | math_state_restore(); /* interrupts still off */ |
920 | conditional_sti(®s); | 921 | conditional_sti(regs); |
921 | } | 922 | } |
922 | #else | 923 | #else |
923 | math_state_restore(); | 924 | math_state_restore(); |