Skip to content

Commit 23b2fd8

Browse files
rmurphy-armwilldeacon
authored andcommitted
perf/arm-cmn: Validate cycles events fully
DTC cycle count events don't have anything to validate or initialise in themselves, but we should not forget to still validate their whole group context. Otherwise, we may fail to correctly reject a contrived group containing an impossible number of cycles events. Signed-off-by: Robin Murphy <[email protected]> Link: https://lore.kernel.org/r/3124e8c276a1f513c1a415dc839ca4181b3c8bc8.1680522545.git.robin.murphy@arm.com Signed-off-by: Will Deacon <[email protected]>
1 parent 4248d04 commit 23b2fd8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/perf/arm-cmn.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1546,7 +1546,7 @@ static int arm_cmn_event_init(struct perf_event *event)
15461546
type = CMN_EVENT_TYPE(event);
15471547
/* DTC events (i.e. cycles) already have everything they need */
15481548
if (type == CMN_TYPE_DTC)
1549-
return 0;
1549+
return arm_cmn_validate_group(cmn, event);
15501550

15511551
eventid = CMN_EVENT_EVENTID(event);
15521552
/* For watchpoints we need the actual XP node here */

0 commit comments

Comments
 (0)