Commit ee0f17b0 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov

restore: Fix typo in shmem size assignment

And use SHMEMS_SIZE constant as well.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
parent a14ceb49
...@@ -351,7 +351,7 @@ static int shmem_remap(struct shmems *old_addr, ...@@ -351,7 +351,7 @@ static int shmem_remap(struct shmems *old_addr,
void *ret; void *ret;
sprintf(path, "/proc/%d/map_files/%p-%p", sprintf(path, "/proc/%d/map_files/%p-%p",
getpid(), old_addr, (void *)old_addr + 4096); getpid(), old_addr, (void *)old_addr + SHMEMS_SIZE);
fd = open(path, O_RDWR); fd = open(path, O_RDWR);
if (fd < 0) { if (fd < 0) {
...@@ -1459,9 +1459,8 @@ static void sigreturn_restore(pid_t pstree_pid, pid_t pid) ...@@ -1459,9 +1459,8 @@ static void sigreturn_restore(pid_t pstree_pid, pid_t pid)
restore_task_code_len = 0; restore_task_code_len = 0;
restore_task_vma_len = 0; restore_task_vma_len = 0;
restore_thread_code_len = 0; restore_thread_code_len = 0;
restore_shmem_vma_len = 0; restore_thread_vma_len = 0;
restore_thread_vma_len = 4096; restore_shmem_vma_len = SHMEMS_SIZE;
if (parse_maps(getpid(), &self_vma_list, false)) if (parse_maps(getpid(), &self_vma_list, false))
goto err; goto err;
......
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