diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-01-17 00:55:30 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-01-17 00:55:30 +0100 |
commit | f4353c3e2aaf7f7d3c5a18271b368bf5292854c3 (patch) | |
tree | c88b560a85103812641e36097e1d32164f0e3e48 /drivers | |
parent | Merge tag 'tag-chrome-platform-fixes-for-v5.5-rc7' of git://git.kernel.org/pu... (diff) | |
parent | cpuidle: teo: Fix intervals[] array indexing bug (diff) | |
download | linux-f4353c3e2aaf7f7d3c5a18271b368bf5292854c3.tar.xz linux-f4353c3e2aaf7f7d3c5a18271b368bf5292854c3.zip |
Merge tag 'pm-5.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management fix from Rafael Wysocki:
"Fix a coding mistake in the teo cpuidle governor causing data to be
written beyond the last array element (Ikjoon Jang)"
* tag 'pm-5.5-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
cpuidle: teo: Fix intervals[] array indexing bug
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/cpuidle/governors/teo.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/cpuidle/governors/teo.c b/drivers/cpuidle/governors/teo.c index de7e706efd46..6deaaf5f05b5 100644 --- a/drivers/cpuidle/governors/teo.c +++ b/drivers/cpuidle/governors/teo.c @@ -198,7 +198,7 @@ static void teo_update(struct cpuidle_driver *drv, struct cpuidle_device *dev) * pattern detection. */ cpu_data->intervals[cpu_data->interval_idx++] = measured_ns; - if (cpu_data->interval_idx > INTERVALS) + if (cpu_data->interval_idx >= INTERVALS) cpu_data->interval_idx = 0; } |