diff options
author | Will Deacon <will.deacon@arm.com> | 2012-01-30 20:23:29 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-13 11:06:05 -0800 |
commit | e358073331debaab9e14b3139bc469184288aa48 (patch) | |
tree | f2230b09275a747f596c0a175fb768e18ad269f8 /arch | |
parent | ae3939e12cc597be0ba28d5f3b3d8f158f2d6d70 (diff) | |
download | kernel_samsung_aries-e358073331debaab9e14b3139bc469184288aa48.zip kernel_samsung_aries-e358073331debaab9e14b3139bc469184288aa48.tar.gz kernel_samsung_aries-e358073331debaab9e14b3139bc469184288aa48.tar.bz2 |
ARM: 7308/1: vfp: flush thread hwstate before copying ptrace registers
commit 8130b9d7b9d858aa04ce67805e8951e3cb6e9b2f upstream.
If we are context switched whilst copying into a thread's
vfp_hard_struct then the partial copy may be corrupted by the VFP
context switching code (see "ARM: vfp: flush thread hwstate before
restoring context from sigframe").
This patch updates the ptrace VFP set code so that the thread state is
flushed before the copy, therefore disabling VFP and preventing
corruption from occurring.
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/kernel/ptrace.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c index 7f1e133..172ae01 100644 --- a/arch/arm/kernel/ptrace.c +++ b/arch/arm/kernel/ptrace.c @@ -746,8 +746,8 @@ static int vfp_set(struct task_struct *target, if (ret) return ret; - thread->vfpstate.hard = new_vfp; vfp_flush_hwstate(thread); + thread->vfpstate.hard = new_vfp; return 0; } |