Commit bdf570c9 authored by Pavel Emelyanov's avatar Pavel Emelyanov

files: Don't dump files whose path doesn't start with /

There are some proc files (ns ones in particular) that are
fake files and on open they screw their path up. Don't dump
them for now.
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent dfaa4542
......@@ -449,6 +449,14 @@ int dump_one_reg_file(int lfd, u32 id, const struct fd_parms *p)
pr_info("Dumping path for %d fd via self %d [%s]\n",
p->fd, lfd, path);
/*
* The regular path we can handle should start with slash.
*/
if (path[0] != '/') {
pr_err("The path [%s] is not supported\n", path);
return -1;
}
if (check_path_remap(rpath, len, &p->stat, lfd, id))
return -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment