]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 9 Aug 2012 23:25:04 +0000 (00:25 +0100)
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: Ben Hutchings <ben@decadent.org.uk>
arch/arm/vfp/vfpmodule.c

index 8ea07e41004560b7bcce5b2c4eaebf490f303055..61e11cea9f75809710e5f17599b7338e2f34f15f 100644 (file)
@@ -456,7 +456,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;
 }