<div dir="ltr"><div>Hi, Cyrill,</div><div><br></div>I did not go that far... I looked at the other lines that handle files under /proc and I didn't see anything special being done about those. The only problem is that criu returns error code for the /proc folder itself, due to what I think is a minor bug. As it is now, if a process does fopen("/proc", "r"), criu will fail to dump it and I found that a little odd since it has no problem with files/folders that are under /proc.<div>If I understand correctly what you are saying, then procfs would not be mounted in /proc, but instead in some /path/to/proc, as seen by the process, right? In that case then the code might need other patches to handle that.</div><div><br></div><div>Thank you,</div><div>Andrei</div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-06-28 10:49 GMT+03:00 Cyrill Gorcunov <span dir="ltr"><<a href="mailto:gorcunov@gmail.com" target="_blank">gorcunov@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Tue, Jun 28, 2016 at 10:02:22AM +0300, Andrei Tuicu wrote:<br>
> CRIU fails to dump processes that have a file descriptor pointing<br>
> to the /proc folder, because check_path_remap returns error code<br>
> in that case. Fix: return 0 instead.<br>
><br>
> Signed-off-by: Andrei Tuicu <<a href="mailto:andrei.tuicu@gmail.com">andrei.tuicu@gmail.com</a>><br>
</span><span class="">> 1 file changed, 2 insertions(+), 2 deletions(-)<br>
><br>
> diff --git a/criu/files-reg.c b/criu/files-reg.c<br>
> index 899dcf6..0fcef6d 100644<br>
> --- a/criu/files-reg.c<br>
> +++ b/criu/files-reg.c<br>
> @@ -975,8 +975,8 @@ static int check_path_remap(struct fd_link *link, const struct fd_parms *parms,<br>
> if (!start)<br>
> return -1;<br>
> start = strstr(start + 1, "/");<br>
> - if (!start)<br>
> - return -1;<br>
> + if (!start) /* it's /proc */<br>
> + return 0;<br>
> pid = strtol(start + 1, &end, 10);<br>
><br>
> /* If strtol didn't convert anything, then we are looking at<br>
<br>
</span>What if the process sitting in some mountnamespace with procfs mounted inside,<br>
then instead of exiting early we've to fallthrough and check for ns root, ie<br>
down to line mntns_root = mntns_get_root_fd(nsid);, if only I'm not missing<br>
somthing obvious. avagin@?<br>
</blockquote></div><br></div>