diff options
author | Pavel Emelyanov <xemul@parallels.com> | 2015-06-05 15:53:00 +0300 |
---|---|---|
committer | Pavel Emelyanov <xemul@parallels.com> | 2015-08-11 19:46:14 +0300 |
commit | 8c5bf2b72353109848eed3e6d7b2d0ae5c3da8ff (patch) | |
tree | ab8ac89006196c97768b9643e415e17534d8b4e5 | |
parent | 729c59d939b405290117370637808aa611df1012 (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.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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 |