Skip to content

Commit

Permalink
ARM: 8810/1: vfp: Fix wrong assignement to ufp_exc
Browse files Browse the repository at this point in the history
In vfp_preserve_user_clear_hwstate, ufp_exc->fpinst2 gets assigned to
itself. It should actually be hwstate->fpinst2 that gets assigned to the
ufp_exc field.

Fixes commit 3aa2df6 ("ARM: 8791/1:
vfp: use __copy_to_user() when saving VFP state").

Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Julien Thierry <julien.thierry@arm.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
  • Loading branch information
Julien Thierry authored and Russell King committed Nov 12, 2018
1 parent 6282e91 commit 5df7a99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm/vfp/vfpmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ int vfp_preserve_user_clear_hwstate(struct user_vfp *ufp,
*/
ufp_exc->fpexc = hwstate->fpexc;
ufp_exc->fpinst = hwstate->fpinst;
ufp_exc->fpinst2 = ufp_exc->fpinst2;
ufp_exc->fpinst2 = hwstate->fpinst2;

/* Ensure that VFP is disabled. */
vfp_flush_hwstate(thread);
Expand Down

0 comments on commit 5df7a99

Please sign in to comment.