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

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

Merge "ARM: 7810/1: perf: Fix array out of bounds access in armpmu_map_hw_event()"

parents ede3702e 96450413
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -54,7 +54,12 @@ armpmu_map_cache_event(unsigned (*cache_map)
static int
armpmu_map_hw_event(const unsigned (*event_map)[PERF_COUNT_HW_MAX], u64 config)
{
	int mapping = (*event_map)[config];
	int mapping;

	if (config >= PERF_COUNT_HW_MAX)
		return -EINVAL;

	mapping = (*event_map)[config];
	return mapping == HW_OP_UNSUPPORTED ? -ENOENT : mapping;
}