From: Keir Fraser Date: Wed, 17 Mar 2010 09:18:34 +0000 (+0000) Subject: Fix a race condition for cpufreq dbs timer while S3 resuming X-Git-Tag: 4.0.0-rc7~15 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=cdffe59f087dafab9ff12f6c8c2be4e67e848342;p=xen.git Fix a race condition for cpufreq dbs timer while S3 resuming The cpufreq_dbs_timer_suspend/resume may race with dbs_timer_init while s3 resuming before this patch. This patch along with cset 21030 fix the bug 1586 http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1586. Signed-off-by: Yu Ke Signed-off-by: Wei Gang --- diff --git a/xen/drivers/cpufreq/cpufreq_ondemand.c b/xen/drivers/cpufreq/cpufreq_ondemand.c index e85bcdf45d..d4d43f4a34 100644 --- a/xen/drivers/cpufreq/cpufreq_ondemand.c +++ b/xen/drivers/cpufreq/cpufreq_ondemand.c @@ -211,6 +211,7 @@ static void dbs_timer_init(struct cpu_dbs_info_s *dbs_info) static void dbs_timer_exit(struct cpu_dbs_info_s *dbs_info) { dbs_info->enable = 0; + dbs_info->stoppable = 0; stop_timer(&dbs_timer[dbs_info->cpu]); }