From: Colin Cross Date: Sat, 28 Apr 2012 01:04:18 +0000 (-0700) Subject: ARM: vfp: only clear vfp state for current cpu in vfp_pm_suspend X-Git-Tag: firefly_0821_release~9235 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8d5e8b025ee36235b58e6da279c7ac6e24126f3a;p=firefly-linux-kernel-4.4.55.git ARM: vfp: only clear vfp state for current cpu in vfp_pm_suspend 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. Change-Id: I997ab1554944eba86730818ff242d7ebe1b32736 Signed-off-by: Colin Cross --- diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c index 74d4f38e5c6e..e37c5fdbdcd5 100644 --- a/arch/arm/vfp/vfpmodule.c +++ b/arch/arm/vfp/vfpmodule.c @@ -426,7 +426,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; }