Commit 2030f2df authored by Pavel Emelyanov's avatar Pavel Emelyanov

timers: Unmap posix timers info mem after restoring them

Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent f8464fda
...@@ -2094,6 +2094,7 @@ static int sigreturn_restore(pid_t pid, CoreEntry *core) ...@@ -2094,6 +2094,7 @@ static int sigreturn_restore(pid_t pid, CoreEntry *core)
} }
task_args->timer_n = posix_timers_nr; task_args->timer_n = posix_timers_nr;
task_args->posix_timers = posix_timers_info_chunk; task_args->posix_timers = posix_timers_info_chunk;
task_args->timers_sz = posix_timers_size;
/* /*
* Get a reference to shared memory area which is * Get a reference to shared memory area which is
......
...@@ -129,8 +129,9 @@ struct task_restore_core_args { ...@@ -129,8 +129,9 @@ struct task_restore_core_args {
struct itimerval itimers[3]; struct itimerval itimers[3];
int timer_n; int timer_n;
struct restore_posix_timer *posix_timers; struct restore_posix_timer *posix_timers;
unsigned long timers_sz;
CredsEntry creds; CredsEntry creds;
uint32_t cap_inh[CR_CAP_SIZE]; uint32_t cap_inh[CR_CAP_SIZE];
......
...@@ -519,6 +519,9 @@ static void restore_posix_timers(struct task_restore_core_args *args) ...@@ -519,6 +519,9 @@ static void restore_posix_timers(struct task_restore_core_args *args)
rt = &args->posix_timers[i]; rt = &args->posix_timers[i];
sys_timer_settime((timer_t)rt->spt.it_id, 0, &rt->val, NULL); sys_timer_settime((timer_t)rt->spt.it_id, 0, &rt->val, NULL);
} }
if (args->timer_n)
sys_munmap(args->posix_timers, args->timers_sz);
} }
/* /*
......
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