[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1464101629-14905-1-git-send-email-vincent.stehle@intel.com>
Date: Tue, 24 May 2016 16:53:49 +0200
From: Vincent Stehlé <vincent.stehle@...el.com>
To: x86@...nel.org
Cc: linux-kernel@...r.kernel.org,
Vincent Stehlé <vincent.stehle@...el.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>
Subject: [PATCH] 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]).
This was introduced by commit 9de8d686955b0e8e27847ed4edbbcd280f3fd8
("perf/x86/intel/rapl: Convert it to a per package facility").
Signed-off-by: Vincent Stehlé <vincent.stehle@...el.com>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Ingo Molnar <mingo@...hat.com>
Cc: "H. Peter Anvin" <hpa@...or.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
Powered by blists - more mailing lists