Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: 8810/1: vfp: Fix wrong assignement to ufp_exc

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 3aa2df6ec2ca6bc143a65351cca4266d03a8bc41 ("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>

authored by

Julien Thierry and committed by
Russell King
5df7a99b 6282e916

+1 -1
+1 -1
arch/arm/vfp/vfpmodule.c
··· 579 579 */ 580 580 ufp_exc->fpexc = hwstate->fpexc; 581 581 ufp_exc->fpinst = hwstate->fpinst; 582 - ufp_exc->fpinst2 = ufp_exc->fpinst2; 582 + ufp_exc->fpinst2 = hwstate->fpinst2; 583 583 584 584 /* Ensure that VFP is disabled. */ 585 585 vfp_flush_hwstate(thread);