From ba2ddd09c42f7a754633c8a7f7e7278b35b92d5f Mon Sep 17 00:00:00 2001 From: Andrey Vagin Date: Fri, 16 Mar 2018 20:24:23 +0300 Subject: [PATCH] unix: handle sockets with USK_CALLBACK as external sockets The USK_CALLBACK flag means that a socket is externel and will be restored by a plugin. open_unixsk_standalone should not be called to these sockets. $ make -C test/others/unix-callback/ run ... (00.109338) 7471: sk unix: Opening standalone socket (id 0xd ino 0 peer 0x63b) (00.109376) 7471: Error (criu/sk-unix.c:1128): sk unix: BUG at criu/sk-unix.c:1128 Acked-by: Cyrill Gorcunov Signed-off-by: Andrei Vagin --- criu/sk-unix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/criu/sk-unix.c b/criu/sk-unix.c index fa15f234d..ed876f49d 100644 --- a/criu/sk-unix.c +++ b/criu/sk-unix.c @@ -1802,7 +1802,7 @@ int add_fake_unix_queuers(void) struct unix_sk_info *ui; list_for_each_entry(ui, &unix_sockets, list) { - if ((ui->ue->uflags & USK_EXTERN) || ui->queuer) + if ((ui->ue->uflags & (USK_EXTERN | USK_CALLBACK)) || ui->queuer) continue; if (!(ui->ue->state == TCP_ESTABLISHED && !ui->peer) && ui->ue->type != SOCK_DGRAM)