Messages in this thread | | | Date | Tue, 8 Oct 2013 14:02:06 +0200 | Subject | Re: [PATCH] perf tools: fix missing default initialization for tool->mmap2 | From | Stephane Eranian <> |
| |
On Tue, Oct 8, 2013 at 1:59 PM, Ingo Molnar <mingo@kernel.org> wrote: > > * Stephane Eranian <eranian@google.com> wrote: > >> >> This patch fixes a SEGFAULT bug with perf sched >> related to the new MMAP2 record type. There was >> a missing default initialization for the tool->mmap2 >> pointer in perf_tool__fill_defaults(). >> >> Reproducer: >> # perf sched record -- sleep 1 >> # perf sched lat >> >> Reported-by: Mike Galbraith <bitbucket@online.de> >> Signed-off-by: Stephane Eranian <eranian@google.com> >> -- >> >> diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c >> index 211b325..8415c54 100644 >> --- a/tools/perf/util/session.c >> +++ b/tools/perf/util/session.c >> @@ -256,6 +256,8 @@ void perf_tool__fill_defaults(struct perf_tool *tool) >> tool->sample = process_event_sample_stub; >> if (tool->mmap == NULL) >> tool->mmap = process_event_stub; >> + if (tool->mmap2 == NULL) >> + tool->mmap2 = process_event_stub; >> if (tool->comm == NULL) >> tool->comm = process_event_stub; >> if (tool->fork == NULL) > > I think it's already fixed in tip:perf/urgent: > > 6adb0b0ae26f perf tools: Add default handler for mmap2 events > Ok, it's good then. Thanks for checking.
| |