From: Arnaldo Carvalho de Melo Date: Tue, 14 Oct 2014 18:07:48 +0000 (-0300) Subject: perf machine: Add missing dsos->root rbtree root initialization X-Git-Tag: fixes-against-v3.18-rc2~37^2~3^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e167f995e26249aa93708589c5eea539652351fa;p=pandora-kernel.git perf machine: Add missing dsos->root rbtree root initialization A segfault happens on 'perf test hists_link' because we end up using a struct machines on the stack, and then machines__init() was not initializing the newly introduced rb_root, just the existing list_head. When we introduced struct dsos, to group the two ways to store dsos, i.e. the linked list and the rbtree, we didn't turned the initialization done in: machines__init(machines->host) -> machine__init() -> INIT_LIST_HEAD into a dsos__init() to keep on initializing the list_head but _as well_ initializing the rb_root, oops. All worked because outside perf-test we probably zalloc the whole thing which ends up initializing it in to NULL. So the problem looks contained to 'perf test' that uses it on stack, etc. Reported-by: Jiri Olsa Acked-by: Waiman Long , Cc: Adrian Hunter , Cc: Don Zickus Cc: Douglas Hatch Cc: Ingo Molnar Cc: Jiri Olsa Cc: Namhyung Kim Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Scott J Norton Cc: Waiman Long , Link: http://lkml.kernel.org/r/20141014180353.GF3198@kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- Reading git-diff-tree failed