mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 22:52:35 +02:00
cpuquiet: Fix locking in driver_unregister
cpuquiet_switch_governors needs to be protected with the cpuquiet_lock. Change-Id: I948d1190a270b9e8b732eaad80a303560fe9f282 Signed-off-by: Sai Gurrappadi <sgurrappadi@nvidia.com> Reviewed-on: http://git-master/r/345013 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Peter Boonstoppel <pboonstoppel@nvidia.com> Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
This commit is contained in:
parent
6ad827eb42
commit
e7e8701d15
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012 NVIDIA CORPORATION. All rights reserved.
|
||||
* Copyright (c) 2012-2013 NVIDIA CORPORATION. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -197,10 +197,10 @@ void cpuquiet_unregister_driver(struct cpuquiet_driver *drv)
|
|||
return;
|
||||
}
|
||||
|
||||
/* stop current governor first */
|
||||
cpuquiet_switch_governor(NULL);
|
||||
|
||||
mutex_lock(&cpuquiet_lock);
|
||||
|
||||
/* Stop current governor first */
|
||||
cpuquiet_switch_governor(NULL);
|
||||
cpuquiet_curr_driver = NULL;
|
||||
|
||||
for_each_possible_cpu(cpu) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user