Skip to content

Commit 206ac6c

Browse files
captain5050gregkh
authored andcommitted
perf lock: Fix option value type in parse_max_stack
[ Upstream commit cfaade3 ] 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: 0a277b6 ("perf lock contention: Check --max-stack option") Signed-off-by: Ian Rogers <irogers@google.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 509d342 commit 206ac6c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tools/perf/builtin-lock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2250,7 +2250,7 @@ static int parse_map_entry(const struct option *opt, const char *str,
22502250
static int parse_max_stack(const struct option *opt, const char *str,
22512251
int unset __maybe_unused)
22522252
{
2253-
unsigned long *len = (unsigned long *)opt->value;
2253+
int *len = opt->value;
22542254
long val;
22552255
char *endptr;
22562256

0 commit comments

Comments
 (0)