2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-30 05:48:05 +00:00

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 <gorcunov@openvz.org>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
Andrey Vagin 2018-03-16 20:24:23 +03:00 committed by Andrei Vagin
parent 9a429e3de8
commit ba2ddd09c4

View File

@ -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)