diff options
author | Madhavan Srinivasan <maddy@linux.vnet.ibm.com> | 2017-08-16 21:51:34 +0530 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-08-17 21:56:36 +1000 |
commit | 711bd207a233141308d0aea0d2e286ee6b4b23cd (patch) | |
tree | 42306fde9a5de9467b487118d6f8e0adb646179c /tools/testing/selftests/powerpc | |
parent | 8bfa42ab84910841336218265fcee94fd1e6285a (diff) |
powerpc/perf: Fix usage of nest_imc_refc
nest_imc_refc is a reference count struct, used to track number of
active perf sessions using the nest units.
Currently the code accesses nest_imc_refc using node_id, which is
incorrect, the array is indexed by node number. Meaning in the case of
sparse node ids we index off the end of the array.
Fix it to use get_nest_pmu_ref() which uses the existing per-cpu
variable local_nest_imc_refc.
Fixes: 885dcd709ba91 ('powerpc/perf: Add nest IMC PMU support')
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
[mpe: Tweak change log]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'tools/testing/selftests/powerpc')
0 files changed, 0 insertions, 0 deletions