diff options
| author | He Zhe <[email protected]> | 2019-08-02 08:29:52 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2019-08-08 18:41:10 +0000 |
| commit | 5f5e25f1c7933a6e1673515c0b1d5acd82fea1ed (patch) | |
| tree | e4d1b719ffea2b873448060a191da46c85f34dea /tools/perf/scripts/python/syscall-counts-by-pid.py | |
| parent | perf ftrace: Fix failure to set cpumask when only one cpu is present (diff) | |
| download | kernel-5f5e25f1c7933a6e1673515c0b1d5acd82fea1ed.tar.gz kernel-5f5e25f1c7933a6e1673515c0b1d5acd82fea1ed.zip | |
perf cpumap: Fix writing to illegal memory in handling cpumap mask
cpu_map__snprint_mask() would write to illegal memory pointed by
zalloc(0) when there is only one cpu.
This patch fixes the calculation and adds sanity check against the input
parameters.
Signed-off-by: He Zhe <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Alexey Budankov <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Kan Liang <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
Fixes: 4400ac8a9a90 ("perf cpumap: Introduce cpu_map__snprint_mask()")
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts-by-pid.py')
0 files changed, 0 insertions, 0 deletions
