mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 06:15:24 +00:00
sk-unix: don't add a socket in a second time
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@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
0c72ab18e0
commit
bc2ac71c1a
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user