mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
[PATCH] Fix maxcpus=1 trigerring BUG() in cpufreq
Ingo reported it on lkml in the thread "2.6.21-rc5: maxcpus=1 crash in cpufreq: kernel BUG at drivers/cpufreq/cpufreq.c:82!" This check added to remove_dev is symmetric to one in add_dev and handles callbacks for offline cpus cleanly. Signed-off-by: Venkatesh Pallipadi <[email protected]> Acked-by: Ingo Molnar <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
703071b5b9
commit
ec28297a56
1 changed files with 4 additions and 0 deletions
|
|
@ -1015,6 +1015,10 @@ static int cpufreq_remove_dev (struct sys_device * sys_dev)
|
|||
{
|
||||
unsigned int cpu = sys_dev->id;
|
||||
int retval;
|
||||
|
||||
if (cpu_is_offline(cpu))
|
||||
return 0;
|
||||
|
||||
if (unlikely(lock_policy_rwsem_write(cpu)))
|
||||
BUG();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue