2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 22:35:33 +00:00

unix: Don't dump external peer w/o name

On restore we will use the peer's name to connect() the
socket back, so if there's no name dump should be aborted.

This situation happens when we create a socketpair(), fork
and dump only one task with one pair end.

Reported-by: Artem Kuzmitskiy <artem.kuzmitskiy@gmail.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Pavel Emelyanov
2015-06-05 15:53:00 +03:00
parent 6979838793
commit 25d074ad91

View File

@@ -564,6 +564,12 @@ static int dump_external_sockets(struct unix_sk_desc *peer)
pr_err("Can't dump half of stream unix connection.\n");
return -1;
}
if (!peer->name) {
show_one_unix("Ext dgram w/o name", peer);
pr_err("Can't dump name-less external socket.\n");
return -1;
}
} else if (ret < 0)
return -1;
else