diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c index 774f6ec884d50cf0d2d3696689e0ca8c4e8e27c5..d2c6cdd9d42b72a194d913bdc1840d5ff72bb281 100644 --- a/tools/perf/util/dso.c +++ b/tools/perf/util/dso.c @@ -363,6 +363,9 @@ static int __open_dso(struct dso *dso, struct machine *machine) return -EINVAL; } + if (!is_regular_file(name)) + return -EINVAL; + fd = do_open(name); free(name); return fd;