diff options
author | Stanislav Ivanichkin <sivanichkin@yandex-team.ru> | 2020-10-27 12:43:57 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2020-11-03 08:31:03 -0300 |
commit | a6293f36ac92ab513771a98efe486477be2f981f (patch) | |
tree | b5f9033c3b3a1edbe350b7f61784f793f80238e2 /drivers/hv/vmbus_drv.c | |
parent | ab8bf5f2e0321f254590ad81c6e230185d88b4e5 (diff) | |
download | linux-a6293f36ac92ab513771a98efe486477be2f981f.tar.gz linux-a6293f36ac92ab513771a98efe486477be2f981f.tar.bz2 linux-a6293f36ac92ab513771a98efe486477be2f981f.zip |
perf trace: Fix segfault when trying to trace events by cgroup
# ./perf trace -e sched:sched_switch -G test -a sleep 1
perf: Segmentation fault
Obtained 11 stack frames.
./perf(sighandler_dump_stack+0x43) [0x55cfdc636db3]
/lib/x86_64-linux-gnu/libc.so.6(+0x3efcf) [0x7fd23eecafcf]
./perf(parse_cgroups+0x36) [0x55cfdc673f36]
./perf(+0x3186ed) [0x55cfdc70d6ed]
./perf(parse_options_subcommand+0x629) [0x55cfdc70e999]
./perf(cmd_trace+0x9c2) [0x55cfdc5ad6d2]
./perf(+0x1e8ae0) [0x55cfdc5ddae0]
./perf(+0x1e8ded) [0x55cfdc5ddded]
./perf(main+0x370) [0x55cfdc556f00]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe6) [0x7fd23eeadb96]
./perf(_start+0x29) [0x55cfdc557389]
Segmentation fault
#
It happens because "struct trace" in option->value is passed to the
parse_cgroups function instead of "struct evlist".
Fixes: 9ea42ba4411ac ("perf trace: Support setting cgroups as targets")
Signed-off-by: Stanislav Ivanichkin <sivanichkin@yandex-team.ru>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Dmitry Monakhov <dmtrmonakhov@yandex-team.ru>
Link: http://lore.kernel.org/lkml/20201027094357.94881-1-sivanichkin@yandex-team.ru
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'drivers/hv/vmbus_drv.c')
0 files changed, 0 insertions, 0 deletions