perf/arm-cmn: Fix invalid pointer when access dtc object sharing the same IRQ number
authorTuan Phan <tuanphan@os.amperecomputing.com>
Thu, 17 Jun 2021 16:08:49 +0000 (09:08 -0700)
committerWill Deacon <will@kernel.org>
Thu, 17 Jun 2021 18:45:02 +0000 (19:45 +0100)
commit4e16f283edc289820e9b2d6f617ed8e514ee8396
tree830b869e222f99ad9e5a311f3ce7cb5ce7e46ae0
parent64432f09068a0fa76f20918a3c22ee3484a3762d
perf/arm-cmn: Fix invalid pointer when access dtc object sharing the same IRQ number

When multiple dtcs share the same IRQ number, the irq_friend which
used to refer to dtc object gets calculated incorrect which leads
to invalid pointer.

Fixes: 0ba64770a2f2 ("perf: Add Arm CMN-600 PMU driver")

Signed-off-by: Tuan Phan <tuanphan@os.amperecomputing.com>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/1623946129-3290-1-git-send-email-tuanphan@os.amperecomputing.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/perf/arm-cmn.c