linux-stable/tools
Arnaldo Carvalho de Melo f4e2d182d6 perf probe: Avoid calling freeing routine multiple times for same pointer
[ Upstream commit d95daf5acc ]

When perf_add_probe_events() we call cleanup_perf_probe_events() for the
pev pointer it receives, then, as part of handling this failure the main
'perf probe' goes on and calls cleanup_params() and that will again call
cleanup_perf_probe_events()for the same pointer, so just set nevents to
zero when handling the failure of perf_add_probe_events() to avoid the
double free.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-x8qgma4g813z96dvtw9w219q@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-08-16 10:12:48 +02:00
..
accounting
arch jump_label: move 'asm goto' support test to Kconfig 2019-06-04 08:02:34 +02:00
bpf tools: bpftool: Fix json dump crash on powerpc 2019-07-26 09:14:16 +02:00
build perf build: Don't unconditionally link the libbfd feature test to -liberty and -lz 2019-02-12 19:47:16 +01:00
cgroup
firewire
gpio
hv Tools: hv: kvp: Fix a warning of buffer overflow with gcc 8.0.1 2019-02-12 19:46:59 +01:00
iio iio: iio-utils: Fix possible incorrect mask calculation 2019-07-31 07:27:02 +02:00
include bpf: fix uapi bpf_prog_info fields alignment 2019-07-26 09:14:15 +02:00
kvm/kvm_stat tools/kvm_stat: fix fields filter for child events 2019-06-19 08:18:05 +02:00
laptop
leds
lib bpf, libbpf, smatch: Fix potential NULL pointer dereference 2019-07-26 09:14:15 +02:00
memory-model tools/memory-model: Rename litmus tests to comply to norm7 2018-07-17 09:30:36 +02:00
nfsd
objtool objtool: Support GCC 9 cold subfunction naming scheme 2019-08-06 19:06:57 +02:00
pci tools: PCI: Add MSI-X support 2018-07-19 11:47:13 +01:00
pcmcia
perf perf probe: Avoid calling freeing routine multiple times for same pointer 2019-08-16 10:12:48 +02:00
power cpupower : frequency-set -r option misses the last cpu in related cpu list 2019-07-26 09:14:03 +02:00
scripts
spi
testing cgroup: kselftest: relax fs_spec checks 2019-08-06 19:06:55 +02:00
thermal/tmon
time
usb usbip: fix vhci_hcd controller counting 2019-04-20 09:16:01 +02:00
virtio virtio: fix test build after uio.h change 2019-01-13 09:51:03 +01:00
vm tools/vm/page-types.c: fix "defined but not used" warning 2018-09-04 16:45:02 -07:00
wmi
Makefile