Skip to content

Commit 275ae41

Browse files
Vincent StehléKAGA-KOKO
authored andcommitted
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: 9de8d68 "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]>
1 parent 0c9f790 commit 275ae41

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/events/intel/rapl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,7 @@ static void cleanup_rapl_pmus(void)
714714
int i;
715715

716716
for (i = 0; i < rapl_pmus->maxpkg; i++)
717-
kfree(rapl_pmus->pmus + i);
717+
kfree(rapl_pmus->pmus[i]);
718718
kfree(rapl_pmus);
719719
}
720720

0 commit comments

Comments
 (0)