[CRIU] [PATCH cr 3/3] sk-unix: don't add a socket in a second time
Andrew Vagin
avagin at parallels.com
Wed Sep 12 08:31:14 EDT 2012
Drop this patch:
====================== ERROR ======================
Dump log : /root/crtools/test/dump/socket-ext/21094/dump.log
Restore log: /root/crtools/test/dump/socket-ext/21094/restore.log
21094: Error (sk-unix.c:750): FATAL: Peer 0x17f1e unresolved for
0x17b65
Error (cr-restore.c:606): 21094 exited, status=255
Error (cr-restore.c:905): Someone can't be restored
On Wed, Sep 12, 2012 at 02:46:39PM +0400, Andrey Vagin wrote:
>
> A socket can be added in a list two times, if two other sockets
> are connected to it.
>
> This patch fixes a problem:
> Error (sk-unix.c:395): BUG at sk-unix.c:395
>
> Signed-off-by: Andrey Vagin <avagin at openvz.org>
> ---
> sk-unix.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/sk-unix.c b/sk-unix.c
> index 47d8e06..d706a34 100644
> --- a/sk-unix.c
> +++ b/sk-unix.c
> @@ -163,7 +163,7 @@ static int dump_one_unix_fd(int lfd, u32 id, const struct fd_parms *p)
> * It can be external socket, so we defer dumping
> * until all sockets the program owns are processed.
> */
> - if (!peer->sd.already_dumped) {
> + if (!peer->sd.already_dumped && !list_empty(&peer->list)) {
> show_one_unix("Add a peer", peer);
> list_add_tail(&peer->list, &unix_sockets);
> }
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://openvz.org/mailman/listinfo/criu
More information about the CRIU
mailing list