summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2012-01-30 20:23:29 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-02-13 11:16:52 -0800
commita4e4a6ee0cc6e069926d006b7a6efd73d33edfcc (patch)
tree53d9f6c03eec51809123d3cbb48de9432fcd5bc5 /arch/arm
parentc85ca4cdfafaee9fd428b934fea18e5c2d850fb6 (diff)
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/arm')
-rw-r--r--arch/arm/kernel/ptrace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c
index 8b17fb452af8..90fa8b36b612 100644
--- a/arch/arm/kernel/ptrace.c
+++ b/arch/arm/kernel/ptrace.c
@@ -726,8 +726,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;
}