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 <gorcunov@virtuozzo.com>

(cherry picked from commit e0e73bcbb8e07e60dbfd4e23cebe2f477a930704)
Signed-off-by: Ahmed Elaidy <elaidya225@gmail.com>
Reviewed-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@futurfusion.io>
This commit is contained in:
Cyrill Gorcunov 2017-05-11 11:58:29 +03:00 committed by Alexander Mikhalitsyn
parent 0dcfa267e2
commit 1dce9eb7c8

View file

@ -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;