From 336b58f94a79f653c0b7826aa7cd145aa5fba5b5 Mon Sep 17 00:00:00 2001 From: Sai Gurrappadi Date: Tue, 13 May 2014 14:50:09 -0700 Subject: [PATCH] drivers: cpuquiet: Fix runnable gov device_busy On device_busy, the runnable governor stops its sample timer and cancels any queued runnable_work. However, it is possible for the cpuquiet platform driver to call device_busy on cpuquiet_quiesence/wake_cpu calls which can be invoked from the queued runnable_worker thread. This will lead to the runnable_worker thread waiting infinitely on it self finishing in cancel_work_sync. Fix this by removing the cancel_work_sync call as it isn't necessary because the worker doesn't requeue it self. Stopping the timer is sufficient. Bug 200002511 Change-Id: Ic69061b12d4dbb96b259ed9b62a0475271bd36d0 Signed-off-by: Sai Gurrappadi (cherry picked from commit b9a2a2cfa91d14935fdef626517d738399af4e4d) Reviewed-on: http://git-master/r/415315 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Diwakar Tundlam Reviewed-by: Kerwin Wan --- drivers/cpuquiet/governors/runnable_threads.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/cpuquiet/governors/runnable_threads.c b/drivers/cpuquiet/governors/runnable_threads.c index f670d1a1aec5..f9d6d560cb35 100644 --- a/drivers/cpuquiet/governors/runnable_threads.c +++ b/drivers/cpuquiet/governors/runnable_threads.c @@ -292,7 +292,6 @@ static void runnables_device_busy(void) mutex_lock(&runnables_lock); if (runnables_state == RUNNING) { runnables_state = IDLE; - cancel_work_sync(&runnables_work); del_timer_sync(&runnables_timer); } mutex_unlock(&runnables_lock); @@ -314,7 +313,6 @@ static void runnables_stop(void) runnables_state = DISABLED; del_timer_sync(&runnables_timer); - cancel_work_sync(&runnables_work); kobject_put(runnables_kobject); kfree(runnables_kobject); -- 2.34.1