aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/signal_32.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2008-03-26 19:02:47 +0900
committerPaul Mundt <lethal@linux-sh.org>2008-03-26 19:02:47 +0900
commit9bbafce2eec190ef7e44b0eb1095ba17ce6ad3af (patch)
tree8deae79efc43d39763bdba8ca9b670e6a1782859 /arch/sh/kernel/signal_32.c
parentLinux 2.6.25-rc7 (diff)
downloadlinux-dev-9bbafce2eec190ef7e44b0eb1095ba17ce6ad3af.tar.xz
linux-dev-9bbafce2eec190ef7e44b0eb1095ba17ce6ad3af.zip
sh: Fix occasional FPU register corruption under preempt.
Presently with preempt enabled there's the possibility to be preempted after the TIF_USEDFPU test and the register save, leading to bogus state post-__switch_to(). Use an explicit preempt_disable()/enable() pair around unlazy_fpu()/clear_fpu() to avoid this. Follows the x86 change. Reported-by: Takuo Koguchi <takuo.koguchi.sw@hitachi.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to '')
-rw-r--r--arch/sh/kernel/signal_32.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/sh/kernel/signal_32.c b/arch/sh/kernel/signal_32.c
index f6b5fbfe75c4..f311551d9a05 100644
--- a/arch/sh/kernel/signal_32.c
+++ b/arch/sh/kernel/signal_32.c
@@ -29,6 +29,7 @@
#include <asm/uaccess.h>
#include <asm/pgtable.h>
#include <asm/cacheflush.h>
+#include <asm/fpu.h>
#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))