* [PATCH] perf/x86/intel/rapl: fix pmus free during cleanup
@ 2016-05-24 14:53 Vincent Stehlé
0 siblings, 0 replies; only message in thread
From: Vincent Stehlé @ 2016-05-24 14:53 UTC (permalink / raw)
To: x86
Cc: linux-kernel, Vincent Stehlé,
Thomas Gleixner, Ingo Molnar, H. Peter Anvin
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-05-24 14:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-24 14:53 [PATCH] perf/x86/intel/rapl: fix pmus free during cleanup Vincent Stehlé
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®