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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jul 2021 14:56:08 +0000 (16:56 +0200)
commite5154bf2177cd408c5077b0e3533e84b0a010130
tree0e5e79cc6cd0b822fc05a9667664495c14d548be
parent31dcfec19dd08c2fb5be0190ac30101dc9815e45
perf/arm-cmn: Fix invalid pointer when access dtc object sharing the same IRQ number

[ Upstream commit 4e16f283edc289820e9b2d6f617ed8e514ee8396 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/perf/arm-cmn.c