OpenCloudOS-Kernel/tools/perf/arch/x86/util
Thomas Richter 81fccd6ca5 perf record: Fix failed memory allocation for get_cpuid_str
In x86 architecture dependend part function get_cpuid_str() mallocs a
128 byte buffer, but does not check if the memory allocation succeeded
or not.

When the memory allocation fails, function __get_cpuid() is called with
first parameter being a NULL pointer.  However this function references
its first parameter and operates on a NULL pointer which might cause
core dumps.

Signed-off-by: Thomas Richter <tmricht@linux.vnet.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Link: http://lkml.kernel.org/r/20180117131611.34319-1-tmricht@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2018-01-17 10:31:25 -03:00
..
Build perf unwind: Separate local/remote libunwind config 2016-06-07 12:08:52 -03:00
auxtrace.c perf tools: Include errno.h where needed 2017-04-19 13:01:51 -03:00
dwarf-regs.c perf dwarf: Guard !x86_64 definitions under #ifdef else clause 2016-04-08 12:04:29 -03:00
group.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
header.c perf record: Fix failed memory allocation for get_cpuid_str 2018-01-17 10:31:25 -03:00
intel-bts.c perf intel-pt/bts: Remove unused SAMPLE_SIZE defines and bts priv array 2017-06-19 15:27:09 -03:00
intel-pt.c perf intel-pt: Always set no branch for dummy event 2017-07-20 09:55:51 -03:00
kvm-stat.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
perf_regs.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pmu.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
tsc.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
unwind-libdw.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
unwind-libunwind.c perf tools: Fix compile error with libunwind x86 2018-01-08 11:11:57 -03:00