diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-20 15:32:51 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-20 15:32:51 -0700 |
commit | 6f33d6458e35d6ba53c2635ee4b8a3177cbd912d (patch) | |
tree | 745e9f3e22d63964ae0d436806bb1bf753e7f959 /include | |
parent | f4814e61836f5571d2b89169ba2e9ea59e2bc8c8 (diff) | |
parent | 350d32395bee1a21deec504a253b336e20d9f35a (diff) |
Merge tag 'pm-4.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management fix from Rafael Wysocki:
"This fixes the pointer arithmetics mess-up in the cpufreq core
introduced by one of recent commits and leading to all kinds of
breakage from kernel crashes to incorrect governor decisions (Sergey
Senozhatsky)"
* tag 'pm-4.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
cpufreq: fix overflow in cpufreq_table_find_index_dl()
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/cpufreq.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 5fa55fc56e18..32dc0cbd51ca 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -677,10 +677,10 @@ static inline int cpufreq_table_find_index_dl(struct cpufreq_policy *policy, if (best == table - 1) return pos - table; - return best - pos; + return best - table; } - return best - pos; + return best - table; } /* Works only on sorted freq-tables */ |