]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ARM: 7476/1: vfp: only clear vfp state for current cpu in vfp_pm_suspend
authorColin Cross <ccross@android.com>
Fri, 20 Jul 2012 01:03:43 +0000 (02:03 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Aug 2012 15:10:06 +0000 (08:10 -0700)
commit a84b895a2348f0dbff31b71ddf954f70a6cde368 upstream.

vfp_pm_suspend runs on each cpu, only clear the hardware state
pointer for the current cpu.  Prevents a possible crash if one
cpu clears the hw state pointer when another cpu has already
checked if it is valid.

Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm/vfp/vfpmodule.c

index b0197b2c857d12588d1d77a026e9f6a60c38b22d..da3b9292f9f0e04407092ec8b70a87464c3d1ceb 100644 (file)
@@ -460,7 +460,7 @@ static int vfp_pm_suspend(void)
        }
 
        /* clear any information we had about last context state */
-       memset(vfp_current_hw_state, 0, sizeof(vfp_current_hw_state));
+       vfp_current_hw_state[ti->cpu] = NULL;
 
        return 0;
 }