Krister Johansen aa33b9b9a2 perf callchain: Reference count maps
If dso__load_kcore frees all of the existing maps, but one has already
been attached to a callchain cursor node, then we can get a SIGSEGV in
any function that happens to try to use this invalid cursor.  Use the
existing map refcount mechanism to forestall cleanup of a map until the
cursor iterates past the node.

Signed-off-by: Krister Johansen <kjlx@templeofstupid.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: stable@kernel.org
Fixes: 84c2cafa2889 ("perf tools: Reference count struct map")
Link: http://lkml.kernel.org/r/20170106062331.GB2707@templeofstupid.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-02-02 11:39:09 -03:00
..
2016-12-01 13:03:19 -03:00
2016-08-04 11:02:38 +02:00
2017-02-02 11:39:09 -03:00
2016-10-19 13:18:31 -03:00
2016-07-12 15:19:47 -03:00
2017-01-10 18:31:55 -08:00
2016-08-23 15:37:33 -03:00
2016-10-19 13:18:31 -03:00
2016-10-19 13:18:31 -03:00
2016-12-15 16:25:46 -03:00