Skip to content

Commit

Permalink
arm64: perf: fix event validation for software group leaders
Browse files Browse the repository at this point in the history
This is a port of c95eb31 ("ARM: 7809/1: perf: fix event validation
for software group leaders") to arm64, which fixes a panic in the arm64
perf backend found as a result of Vince's fuzzing tool.

Cc: <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
Signed-off-by: Catalin Marinas <[email protected]>
  • Loading branch information
wildea01 authored and ctmarinas committed Aug 20, 2013
1 parent 868f6fe commit ee7538a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/arm64/kernel/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,9 @@ validate_event(struct pmu_hw_events *hw_events,
struct hw_perf_event fake_event = event->hw;
struct pmu *leader_pmu = event->group_leader->pmu;

if (is_software_event(event))
return 1;

if (event->pmu != leader_pmu || event->state <= PERF_EVENT_STATE_OFF)
return 1;

Expand Down

0 comments on commit ee7538a

Please sign in to comment.