perf tools: Protect dso cache fd with a mutex
authorNamhyung Kim <namhyung@kernel.org>
Mon, 18 May 2015 00:30:42 +0000 (09:30 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 18 May 2015 13:17:38 +0000 (10:17 -0300)
commit33bdedcea2d77231fe46b1204cf6fc3a7d7c96c9
treef647819aaaeb91644e3c68f4f14b7779917dd400
parent8e67b7258e582998ab635bdc3c884d7a8077af5b
perf tools: Protect dso cache fd with a mutex

When dso cache is accessed in multi-thread environment, it's possible to
close other dso->data.fd during operation due to open file limit.
Protect the file descriptors using a separate mutex.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1431909055-21442-28-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/dso.c