Skip to content

Commit

Permalink
perf/x86/intel/rapl: Fix pmus free during cleanup
Browse files Browse the repository at this point in the history
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é <vincent.stehle@intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/1464101629-14905-1-git-send-email-vincent.stehle@intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Vincent Stehlé authored and Thomas Gleixner committed May 25, 2016
1 parent 0c9f790 commit 275ae41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/events/intel/rapl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 275ae41

Please sign in to comment.