]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - kernel/sched/cpufreq_schedutil.c
Bluetooth: hidp: buffer overflow in hidp_process_report
[mirror_ubuntu-bionic-kernel.git] / kernel / sched / cpufreq_schedutil.c
index d6717a3331a1b21bd1be02f034596ab293e8ceac..81eb7899c7c88e65b0bd5438330c2027707c9675 100644 (file)
@@ -282,7 +282,8 @@ static void sugov_update_single(struct update_util_data *hook, u64 time,
                 * Do not reduce the frequency if the CPU has not been idle
                 * recently, as the reduction is likely to be premature then.
                 */
-               if (busy && next_f < sg_policy->next_freq) {
+               if (busy && next_f < sg_policy->next_freq &&
+                   sg_policy->next_freq != UINT_MAX) {
                        next_f = sg_policy->next_freq;
 
                        /* Reset cached freq as next_freq has changed */