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

Commit 4346fc52 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "sched: fair: Fix potential array out-of-bounds read in __find_new_capacity"

parents e6593587 cfcd9f27
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -5658,10 +5658,10 @@ static int __find_new_capacity(unsigned long util,

	for (idx = 0; idx < sge->nr_cap_states; idx++) {
		if (sge->cap_states[idx].cap >= util)
			break;
			return idx;
	}

	return idx;
	return (sge->nr_cap_states - 1);
}

static int find_new_capacity(struct energy_env *eenv,