[CRIU] [PATCH 08/12] cr-restore: Warn if restorer can't be unmapped
Dmitry Safonov
dima at arista.com
Sun Nov 10 01:20:41 MSK 2019
Too late to stop restore: it's already printed that restore was
successful. Oh, well warn aloud about infection.
Signed-off-by: Dmitry Safonov <dima at arista.com>
---
criu/cr-restore.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/criu/cr-restore.c b/criu/cr-restore.c
index de0b2cb407dd..41f78cb7a2f9 100644
--- a/criu/cr-restore.c
+++ b/criu/cr-restore.c
@@ -1953,6 +1953,7 @@ static void finalize_restore(void)
for_each_pstree_item(item) {
pid_t pid = item->pid->real;
struct parasite_ctl *ctl;
+ unsigned long restorer_addr;
if (!task_alive(item))
continue;
@@ -1962,7 +1963,9 @@ static void finalize_restore(void)
if (ctl == NULL)
continue;
- compel_unmap(ctl, (unsigned long)rsti(item)->munmap_restorer);
+ restorer_addr = (unsigned long)rsti(item)->munmap_restorer;
+ if (compel_unmap(ctl, restorer_addr))
+ pr_err("Failed to unmap restorer from %d\n", pid);
xfree(ctl);
--
2.24.0
More information about the CRIU
mailing list