linux/kernel/events
Thomas Gleixner 059fcd8cd1 perf/core: Plug potential memory leak in CPU_UP_PREPARE
If CPU_UP_PREPARE is called it is not guaranteed, that a previously allocated
and assigned hash has been freed already, but perf_event_init_cpu()
unconditionally allocates and assignes a new hash if the swhash is referenced.
By overwriting the pointer the existing hash is not longer accessible.

Verify that there is no hash assigned on this cpu before allocating and
assigning a new one.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Link: http://lkml.kernel.org/r/20160209201007.843269966@linutronix.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2016-02-17 10:37:30 +01:00
..
Makefile
callchain.c treewide: Remove old email address 2015-11-23 09:44:58 +01:00
core.c perf/core: Plug potential memory leak in CPU_UP_PREPARE 2016-02-17 10:37:30 +01:00
hw_breakpoint.c perf: Collapse and fix event_function_call() users 2016-01-21 18:54:24 +01:00
internal.h perf: Fix AUX buffer refcounting 2015-07-06 14:08:30 +02:00
ring_buffer.c perf: Synchronously free aux pages in case of allocation failure 2016-01-21 18:54:27 +01:00
uprobes.c memcg: adjust to support new THP refcounting 2016-01-15 17:56:32 -08:00