提交 8130b9d7 编写于 作者: W Will Deacon 提交者: Russell King

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 <stable@vger.kernel.org>
Signed-off-by: NWill Deacon <will.deacon@arm.com>
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 247f4993
...@@ -726,8 +726,8 @@ static int vfp_set(struct task_struct *target, ...@@ -726,8 +726,8 @@ static int vfp_set(struct task_struct *target,
if (ret) if (ret)
return ret; return ret;
thread->vfpstate.hard = new_vfp;
vfp_flush_hwstate(thread); vfp_flush_hwstate(thread);
thread->vfpstate.hard = new_vfp;
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册