perf/arm-dmc620: Fix lockdep assert in ->event_init()
authorNamhyung Kim <namhyung@kernel.org>
Tue, 14 May 2024 18:00:50 +0000 (11:00 -0700)
committerWill Deacon <will@kernel.org>
Fri, 17 May 2024 15:48:05 +0000 (16:48 +0100)
commita4c5a457c6107dfe9dc65a104af1634811396bac
treeebe67cbdd9c91d2e5184cba73b5fbe8086cf4d4a
parentb8995a18417088bb53f87c49d200ec72a9dd4ec1
perf/arm-dmc620: Fix lockdep assert in ->event_init()

for_each_sibling_event() checks leader's ctx but it doesn't have the ctx
yet if it's the leader.  Like in perf_event_validate_size(), we should
skip checking siblings in that case.

Acked-by: Mark Rutland <mark.rutland@arm.com>
Fixes: f3c0eba28704 ("perf: Add a few assertions")
Reported-by: Greg Thelen <gthelen@google.com>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: Tuan Phan <tuanphan@os.amperecomputing.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/20240514180050.182454-1-namhyung@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
drivers/perf/arm_dmc620_pmu.c