summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2026-03-20 02:33:48 +0300
committerNamhyung Kim <namhyung@kernel.org>2026-03-27 01:02:42 +0300
commitcfaade34b52aa1ec553044255702c4b31b57c005 (patch)
tree1dc81d852d16bb83242ec77e5611b689a2f3fbbb /tools
parent46a009cf0d85cba05d4667214db18a4c20dd6b8e (diff)
downloadlinux-cfaade34b52aa1ec553044255702c4b31b57c005.tar.xz
perf lock: Fix option value type in parse_max_stack
The value is a void* and the address of an int, max_stack_depth, is set up in the perf lock options. The parse_max_stack function treats the int* as a long*, make this more correct by declaring the value to be an int*. Fixes: 0a277b622670 ("perf lock contention: Check --max-stack option") Signed-off-by: Ian Rogers <irogers@google.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/builtin-lock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/builtin-lock.c b/tools/perf/builtin-lock.c
index e8962c985d34..5585aeb97684 100644
--- a/tools/perf/builtin-lock.c
+++ b/tools/perf/builtin-lock.c
@@ -2250,7 +2250,7 @@ static int parse_map_entry(const struct option *opt, const char *str,
static int parse_max_stack(const struct option *opt, const char *str,
int unset __maybe_unused)
{
- unsigned long *len = (unsigned long *)opt->value;
+ int *len = opt->value;
long val;
char *endptr;