diff options
Diffstat (limited to 'tools/perf/bench/futex-wake.c')
-rw-r--r-- | tools/perf/bench/futex-wake.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/perf/bench/futex-wake.c b/tools/perf/bench/futex-wake.c index e246b1b8388a..46efcb98b5a4 100644 --- a/tools/perf/bench/futex-wake.c +++ b/tools/perf/bench/futex-wake.c @@ -129,6 +129,7 @@ int bench_futex_wake(int argc, const char **argv, } ncpus = sysconf(_SC_NPROCESSORS_ONLN); + nwakes = futexbench_sanitize_numeric(nwakes); sigfillset(&act.sa_mask); act.sa_sigaction = toggle_done; @@ -136,6 +137,8 @@ int bench_futex_wake(int argc, const char **argv, if (!nthreads) nthreads = ncpus; + else + nthreads = futexbench_sanitize_numeric(nthreads); worker = calloc(nthreads, sizeof(*worker)); if (!worker) |