diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2020-03-24 08:03:19 +0100 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2020-03-24 14:36:00 +0100 |
commit | d74b181a028bb5a468f0c609553eff6a8fdf4887 (patch) | |
tree | ed70531aa33d64b6bd10eece38179b8fee3a601a /tools/wmi | |
parent | perf test: Test pmu-events aliases (diff) | |
download | linux-d74b181a028bb5a468f0c609553eff6a8fdf4887.tar.xz linux-d74b181a028bb5a468f0c609553eff6a8fdf4887.zip |
perf cpumap: Fix snprintf overflow check
'snprintf' returns the number of characters which would be generated for
the given input.
If the returned value is *greater than* or equal to the buffer size, it
means that the output has been truncated.
Fix the overflow test accordingly.
Fixes: 7780c25bae59f ("perf tools: Allow ability to map cpus to nodes easily")
Fixes: 92a7e1278005b ("perf cpumap: Add cpu__max_present_cpu()")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Suggested-by: David Laight <David.Laight@ACULAB.COM>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: He Zhe <zhe.he@windriver.com>
Cc: Jan Stancek <jstancek@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: kernel-janitors@vger.kernel.org
Link: http://lore.kernel.org/lkml/20200324070319.10901-1-christophe.jaillet@wanadoo.fr
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/wmi')
0 files changed, 0 insertions, 0 deletions