Commit 2677006c authored by Pavel Emelyanov's avatar Pavel Emelyanov

restorer: Check error from exe link restore

Kenrel API is stable enough not to ignore it.
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent e49faff1
...@@ -318,14 +318,15 @@ core_restore_end: ...@@ -318,14 +318,15 @@ core_restore_end:
static long restore_self_exe_late(struct task_restore_args *args) static long restore_self_exe_late(struct task_restore_args *args)
{ {
int fd = args->fd_exe_link; int fd = args->fd_exe_link, ret;
pr_info("Restoring EXE link\n"); pr_info("Restoring EXE link\n");
sys_prctl_safe(PR_SET_MM, PR_SET_MM_EXE_FILE, fd, 0); ret = sys_prctl_safe(PR_SET_MM, PR_SET_MM_EXE_FILE, fd, 0);
if (ret)
pr_err("Can't restore EXE link (%d)\n", ret);
sys_close(fd); sys_close(fd);
/* FIXME Once kernel side stabilized -- fix error reporting */ return ret;
return 0;
} }
static unsigned long restore_mapping(const VmaEntry *vma_entry) static unsigned long restore_mapping(const VmaEntry *vma_entry)
......
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