Skip to content

Commit

Permalink
ARM: 7476/1: vfp: only clear vfp state for current cpu in vfp_pm_suspend
Browse files Browse the repository at this point in the history
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.

Cc: stable@vger.kernel.org
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Colin Cross authored and Russell King committed Jul 31, 2012
1 parent 4c36595 commit a84b895
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 @@ -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;
}
Expand Down

0 comments on commit a84b895

Please sign in to comment.