Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6f33d645 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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()
parents f4814e61 350d3239
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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 */