perf symbols: Do not open device files
authorJiri Olsa <[email protected]>
Tue, 20 Sep 2016 16:12:45 +0000 (18:12 +0200)
committerArnaldo Carvalho de Melo <[email protected]>
Tue, 20 Sep 2016 19:20:21 +0000 (16:20 -0300)
commit3c028a0cb5b71f47d523bc8ad2c597cb257f41fb
tree782214a4e3c7cfd92453664ebec061297452711f
parente3b60bc93d81e0542ac433df226b8de8b963533e
perf symbols: Do not open device files

The dso__read_binary_type_filename gets the dso's file name to open. We
need to check it for regular file before trying to open it, otherwise we
might get stuck with device file.

Signed-off-by: Jiri Olsa <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Don Zickus <[email protected]>
Cc: Joe Mario <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/20160920161245.GA8995@krava
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
tools/perf/util/dso.c