Commit 8ebf1c48 authored by Andrey Vagin's avatar Andrey Vagin Committed by Andrei Vagin

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: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 7da537fd
...@@ -1786,7 +1786,7 @@ int add_fake_unix_queuers(void) ...@@ -1786,7 +1786,7 @@ int add_fake_unix_queuers(void)
struct unix_sk_info *ui; struct unix_sk_info *ui;
list_for_each_entry(ui, &unix_sockets, list) { 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; continue;
if (!(ui->ue->state == TCP_ESTABLISHED && !ui->peer) && if (!(ui->ue->state == TCP_ESTABLISHED && !ui->peer) &&
ui->ue->type != SOCK_DGRAM) ui->ue->type != SOCK_DGRAM)
......
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