[09/12] parasite-syscall: Log if can't cure on failed infection

Submitted by Dmitry Safonov on Nov. 9, 2019, 10:20 p.m.

Details

Message ID 20191109222045.89507-10-dima@arista.com
State Accepted
Series "compel: Add __must_check"
Commit f29c067ed780365bca61b7a2a8a6a1bf15671048
Headers show

Commit Message

Dmitry Safonov Nov. 9, 2019, 10:20 p.m.
Maybe expected, hopefully never happens - let's warn in any case.

Signed-off-by: Dmitry Safonov <dima@arista.com>
---
 criu/parasite-syscall.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/criu/parasite-syscall.c b/criu/parasite-syscall.c
index b9788a4c288a..e5a8194e581b 100644
--- a/criu/parasite-syscall.c
+++ b/criu/parasite-syscall.c
@@ -565,7 +565,8 @@  struct parasite_ctl *parasite_infect_seized(pid_t pid, struct pstree_item *item,
 	parasite_ensure_args_size(aio_rings_args_size(vma_area_list));
 
 	if (compel_infect(ctl, item->nr_threads, parasite_args_size) < 0) {
-		compel_cure(ctl);
+		if (compel_cure(ctl))
+			pr_warn("Can't cure failed infection\n");
 		return NULL;
 	}