提交 a78ce80d 编写于 作者: D Dave Martin 提交者: Linus Torvalds

metag/ptrace: Preserve previous registers for short regset write

Ensure that if userspace supplies insufficient data to PTRACE_SETREGSET
to fill all the registers, the thread's old registers are preserved.
Signed-off-by: NDave Martin <Dave.Martin@arm.com>
Acked-by: NJames Hogan <james.hogan@imgtec.com>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 502585c7
......@@ -303,7 +303,7 @@ static int metag_tls_set(struct task_struct *target,
const void *kbuf, const void __user *ubuf)
{
int ret;
void __user *tls;
void __user *tls = target->thread.tls_ptr;
ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &tls, 0, -1);
if (ret)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册