Commit 23c953f
sched: prevent out of bound access in sched_group_energy()
group_idle_state() can return INT_MAX + 1 which is undefined behaviour
when there is no CPUs in sched_group. Prevent such by error correctly.
Change-Id: If9796c829c091e461231569dc38c5e5456f58037
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
[clingutla@codeaurora.org: Fixed trivial merge conflicts and squashed
msm-4.14 change]
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
(cherry picked from commit bb5b0e61527011e4ebfc4058713a9068da9e7492)1 parent afee777 commit 23c953f
1 file changed
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5792 | 5792 | | |
5793 | 5793 | | |
5794 | 5794 | | |
| 5795 | + | |
| 5796 | + | |
| 5797 | + | |
5795 | 5798 | | |
5796 | 5799 | | |
5797 | 5800 | | |
| |||
5858 | 5861 | | |
5859 | 5862 | | |
5860 | 5863 | | |
5861 | | - | |
| 5864 | + | |
5862 | 5865 | | |
5863 | 5866 | | |
5864 | 5867 | | |
| |||
5887 | 5890 | | |
5888 | 5891 | | |
5889 | 5892 | | |
| 5893 | + | |
| 5894 | + | |
5890 | 5895 | | |
5891 | 5896 | | |
5892 | 5897 | | |
| |||
5895 | 5900 | | |
5896 | 5901 | | |
5897 | 5902 | | |
| 5903 | + | |
5898 | 5904 | | |
5899 | 5905 | | |
5900 | 5906 | | |
| |||
5956 | 5962 | | |
5957 | 5963 | | |
5958 | 5964 | | |
5959 | | - | |
| 5965 | + | |
| 5966 | + | |
5960 | 5967 | | |
5961 | 5968 | | |
5962 | 5969 | | |
| |||
0 commit comments