Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/checkpoint-restore/criu.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@parallels.com>2015-06-05 15:53:00 +0300
committerPavel Emelyanov <xemul@parallels.com>2015-08-11 19:46:14 +0300
commit8c5bf2b72353109848eed3e6d7b2d0ae5c3da8ff (patch)
treeab8ac89006196c97768b9643e415e17534d8b4e5
parent729c59d939b405290117370637808aa611df1012 (diff)
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>
-rw-r--r--sk-unix.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sk-unix.c b/sk-unix.c
index f156ca58c..d5ec4d868 100644
--- a/sk-unix.c
+++ b/sk-unix.c
@@ -669,6 +669,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