Skip to content

Commit 8130b9d

Browse files
wildea01Russell King
authored andcommitted
ARM: 7308/1: vfp: flush thread hwstate before copying ptrace registers
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. Cc: stable <[email protected]> Signed-off-by: Will Deacon <[email protected]> Signed-off-by: Russell King <[email protected]>
1 parent 247f499 commit 8130b9d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm/kernel/ptrace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -726,8 +726,8 @@ static int vfp_set(struct task_struct *target,
726726
if (ret)
727727
return ret;
728728

729-
thread->vfpstate.hard = new_vfp;
730729
vfp_flush_hwstate(thread);
730+
thread->vfpstate.hard = new_vfp;
731731

732732
return 0;
733733
}

0 commit comments

Comments
 (0)