aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent StehlĂ© <[email protected]>2016-05-24 16:53:49 +0200
committerThomas Gleixner <[email protected]>2016-05-25 10:56:43 +0200
commit275ae411e56f8f900fa364da29c4706f9af4e1f3 (patch)
tree48f0835278f71d4830b7a05654f5f30a384a30c3
parent0c9f790fcbdaf8cfb6dd7fb4e88fadf55082e37e (diff)
perf/x86/intel/rapl: Fix pmus free during cleanup
On rapl cleanup path, kfree() is given by mistake the address of the pointer of the structure to free (rapl_pmus->pmus + i). Pass the pointer instead (rapl_pmus->pmus[i]). Fixes: 9de8d686955b "perf/x86/intel/rapl: Convert it to a per package facility" Signed-off-by: Vincent StehlĂ© <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
-rw-r--r--arch/x86/events/intel/rapl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/events/intel/rapl.c b/arch/x86/events/intel/rapl.c
index 99c4bab123cd..e30eef4f29a6 100644
--- a/arch/x86/events/intel/rapl.c
+++ b/arch/x86/events/intel/rapl.c
@@ -714,7 +714,7 @@ static void cleanup_rapl_pmus(void)
int i;
for (i = 0; i < rapl_pmus->maxpkg; i++)
- kfree(rapl_pmus->pmus + i);
+ kfree(rapl_pmus->pmus[i]);
kfree(rapl_pmus);
}