Commit 2e31cb1f authored by Pavel Emelyanov's avatar Pavel Emelyanov Committed by Cyrill Gorcunov

restore: Close and drop shmem remap fd

Reprimand to commits bd8b2b0f and d0a6e9a1 authors for not
cleaning after themselves...
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
parent a28d53f4
......@@ -356,10 +356,13 @@ static int shmem_remap(struct shmems *old_addr, struct shmems *new_addr)
return -1;
}
if (new_addr->nr_shmems != old_addr->nr_shmems)
if (new_addr->nr_shmems != old_addr->nr_shmems) {
pr_err("shmem_remap failed\n");
return -1;
}
return fd;
close(fd);
return 0;
}
static int prepare_shared(int ps_fd)
......@@ -1484,7 +1487,6 @@ static void sigreturn_restore(pid_t pstree_pid, pid_t pid)
task_args->shmems = shmems_ref;
task_args->fd_core = fd_core;
task_args->fd_self_vmas = fd_self_vmas;
task_args->shmems_fd = ret;
cr_mutex_init(&task_args->rst_lock);
......
......@@ -75,7 +75,6 @@ struct task_restore_core_args {
thread_restore_fcall_t clone_restore_fn; /* helper address for clone() call */
struct thread_restore_args *thread_args; /* array of thread arguments */
struct shmems *shmems;
int shmems_fd;
} __aligned(sizeof(long));
struct pt_regs {
......
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