diff options
author | Yicong Yang <yangyicong@hisilicon.com> | 2023-10-24 17:29:53 +0800 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2023-10-24 12:30:44 +0100 |
commit | 6d7d51e88e21c0af1ca96a3617afef334bfeffcf (patch) | |
tree | 4071d013edfc71b6abacb2f4c0b7d608c0b1bfd6 /mm/debug_vm_pgtable.c | |
parent | ab33c66fd8f124f7c4a35c96fcfbcd262764b0f6 (diff) |
drivers/perf: hisi_pcie: Check the type first in pmu::event_init()
Check whether the event type matches the PMU type firstly in
pmu::event_init() before touching the event. Otherwise we'll
change the events of others and lead to incorrect results.
Since in perf_init_event() we may call every pmu's event_init()
in a certain case, we should not modify the event if it's not
ours.
Fixes: 8404b0fbc7fb ("drivers/perf: hisi: Add driver for HiSilicon PCIe PMU")
Signed-off-by: Yicong Yang <yangyicong@hisilicon.com>
Link: https://lore.kernel.org/r/20231024092954.42297-2-yangyicong@huawei.com
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'mm/debug_vm_pgtable.c')
0 files changed, 0 insertions, 0 deletions