Unverified Commit c2bdc9e9 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!5348 s390/ptrace: handle setting of fpc register correctly

parents 4d81322f d9c08632
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -411,6 +411,7 @@ static int __poke_user(struct task_struct *child, addr_t addr, addr_t data)
		/*
		 * floating point control reg. is in the thread structure
		 */
		save_fpu_regs();
		if ((unsigned int) data != 0 ||
		    test_fp_ctl(data >> (BITS_PER_LONG - 32)))
			return -EINVAL;
@@ -771,6 +772,7 @@ static int __poke_user_compat(struct task_struct *child,
		/*
		 * floating point control reg. is in the thread structure
		 */
		save_fpu_regs();
		if (test_fp_ctl(tmp))
			return -EINVAL;
		child->thread.fpu.fpc = data;
@@ -1010,9 +1012,7 @@ static int s390_fpregs_set(struct task_struct *target,
	int rc = 0;
	freg_t fprs[__NUM_FPRS];

	if (target == current)
	save_fpu_regs();

	if (MACHINE_HAS_VX)
		convert_vx_to_fp(fprs, target->thread.fpu.vxrs);
	else