Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fd7c9914 authored by Dave Martin's avatar Dave Martin Committed by Chris Metcalf
Browse files

tile/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.

Cc: stable@vger.kernel.org
Signed-off-by: default avatarDave Martin <Dave.Martin@arm.com>
Signed-off-by: default avatarChris Metcalf <cmetcalf@mellanox.com>
parent 0c744ea4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -111,7 +111,7 @@ static int tile_gpr_set(struct task_struct *target,
			  const void *kbuf, const void __user *ubuf)
{
	int ret;
	struct pt_regs regs;
	struct pt_regs regs = *task_pt_regs(target);

	ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &regs, 0,
				 sizeof(regs));