Messages in this thread Patch in this message | | | From | Vincent Stehlé <> | Subject | [PATCH] perf/x86/intel/rapl: fix pmus free during cleanup | Date | Tue, 24 May 2016 16:53:49 +0200 |
| |
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]).
This was introduced by commit 9de8d686955b0e8e27847ed4edbbcd280f3fd8 ("perf/x86/intel/rapl: Convert it to a per package facility").
Signed-off-by: Vincent Stehlé <vincent.stehle@intel.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> --- arch/x86/events/intel/rapl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/events/intel/rapl.c b/arch/x86/events/intel/rapl.c index 99c4bab..e30eef4 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); } -- 2.8.1
| |