From 1dce9eb7c88b266ff0002cc891bd355f898ea6b8 Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Thu, 11 May 2017 11:58:29 +0300 Subject: [PATCH] ucred: Drop packets from dead processes A process may send creds message and get exited so the message will be detected on checkpoint but we won't be able to queue it back because process is already dead and such sending is forbidden by kernel. So just ignore such packets. Signed-off-by: Cyrill Gorcunov (cherry picked from commit e0e73bcbb8e07e60dbfd4e23cebe2f477a930704) Signed-off-by: Ahmed Elaidy Reviewed-by: Alexander Mikhalitsyn --- criu/sk-queue.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/criu/sk-queue.c b/criu/sk-queue.c index 1a4c77c96..7cc6c7692 100644 --- a/criu/sk-queue.c +++ b/criu/sk-queue.c @@ -166,16 +166,15 @@ int sk_queue_post_actions(void) } if (!found) { - pr_err("ucred: Can't lookup process with pid %d\n", - ue->pid); - ret = -ENOENT; + pr_warn("ucred: Can't find process with pid %d, ignoring packet\n", + ue->pid); goto next; - } else { - pr_debug("ucred: Fixup ucred pids %d -> %d\n", - ue->pid, vpid(item)); - ue->pid = vpid(item); } + pr_debug("ucred: Fixup ucred pids %d -> %d\n", + ue->pid, vpid(item)); + ue->pid = vpid(item); + ret = pb_write_one(img, pkt->entry, PB_SK_QUEUES); if (ret < 0) { ret = -EIO;