Commit 25d074ad authored by Pavel Emelyanov's avatar Pavel Emelyanov

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: 's avatarArtem Kuzmitskiy <artem.kuzmitskiy@gmail.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 69798387
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment