|
|
@@ -623,6 +623,10 @@ static int fpr_get(struct task_struct *target, const struct user_regset *regset,
|
|
|
{
|
|
|
struct user_fpsimd_state *uregs;
|
|
|
uregs = &target->thread.fpsimd_state.user_fpsimd;
|
|
|
+
|
|
|
+ if (target == current)
|
|
|
+ fpsimd_preserve_current_state();
|
|
|
+
|
|
|
return user_regset_copyout(&pos, &count, &kbuf, &ubuf, uregs, 0, -1);
|
|
|
}
|
|
|
|
|
|
@@ -898,6 +902,9 @@ static int compat_vfp_get(struct task_struct *target,
|
|
|
|
|
|
uregs = &target->thread.fpsimd_state.user_fpsimd;
|
|
|
|
|
|
+ if (target == current)
|
|
|
+ fpsimd_preserve_current_state();
|
|
|
+
|
|
|
/*
|
|
|
* The VFP registers are packed into the fpsimd_state, so they all sit
|
|
|
* nicely together for us. We just need to create the fpscr separately.
|