Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 275ae411 authored by Vincent Stehlé's avatar Vincent Stehlé Committed by Thomas Gleixner
Browse files

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: 9de8d686 "perf/x86/intel/rapl: Convert it to a per package facility"
Signed-off-by: default avatarVincent 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: default avatarThomas Gleixner <tglx@linutronix.de>
parent 0c9f790f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
}