diff --git a/criu/shmem.c b/criu/shmem.c index 63a2e7749..758e4170b 100644 --- a/criu/shmem.c +++ b/criu/shmem.c @@ -441,16 +441,11 @@ int collect_shmem(int pid, struct vma_area *vma) static int shmem_wait_and_open(struct shmem_info *si, VmaEntry *vi) { - char path[128]; int pid, ret; pr_info("Waiting for the %lx shmem to appear\n", si->shmid); futex_wait_while(&si->lock, 0); - snprintf(path, sizeof(path), "/proc/%d/fd/%d", - si->pid, si->fd); - - pr_info("Opening shmem [%s] \n", path); pid = pstree_pid_by_virt(si->pid)->real; ret = open_fd_of_real_pid(pid, si->fd, O_RDWR); futex_inc_and_wake(&si->lock); diff --git a/criu/util.c b/criu/util.c index 6fa0ab05f..431ee0aba 100644 --- a/criu/util.c +++ b/criu/util.c @@ -1411,6 +1411,7 @@ int open_fd_of_real_pid(pid_t pid, int fd, int flags) int ret; ret = sprintf(path, "%d/fd/%d", pid, fd); + pr_info("Opening /proc/%s on the criu side\n", path); if (flags == O_RDONLY) ret = userns_call(fn_open_proc_r, UNS_FDOUT, path, ret + 1, -1); else if (flags == O_WRONLY)