commit criu for openSUSE:Factory
Hello community, here is the log from the commit of package criu for openSUSE:Factory checked in at 2015-04-30 11:50:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/criu (Old) and /work/SRC/openSUSE:Factory/.criu.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "criu" Changes: -------- --- /work/SRC/openSUSE:Factory/criu/criu.changes 2015-04-10 09:51:48.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.criu.new/criu.changes 2015-04-30 11:50:47.000000000 +0200 @@ -1,0 +2,8 @@ +Tue Apr 28 11:54:14 CEST 2015 - tiwai@suse.de + +- update to version 1.5.2: + * fix error in mutli-threaded tasks restore with --restore-sibling + (Docker and LXC cases) + * fix too big RPC messages error for service (and swrk) + +------------------------------------------------------------------- Old: ---- criu-1.5.1.tar.bz2 New: ---- criu-1.5.2.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ criu.spec ++++++ --- /var/tmp/diff_new_pack.fQETpm/_old 2015-04-30 11:50:49.000000000 +0200 +++ /var/tmp/diff_new_pack.fQETpm/_new 2015-04-30 11:50:49.000000000 +0200 @@ -16,9 +16,9 @@ # -%define package_version 1.5.1 +%define package_version 1.5.2 Name: criu -Version: 1.5.1 +Version: 1.5.2 Release: 0 Summary: Checkpoint/Restore In Userspace Tools License: GPL-2.0 ++++++ criu-1.5.1.tar.bz2 -> criu-1.5.2.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/criu-1.5.1/Makefile new/criu-1.5.2/Makefile --- old/criu-1.5.1/Makefile 2015-03-31 20:19:21.000000000 +0200 +++ new/criu-1.5.2/Makefile 2015-04-28 08:07:09.000000000 +0200 @@ -1,6 +1,6 @@ VERSION_MAJOR := 1 VERSION_MINOR := 5 -VERSION_SUBLEVEL := 1 +VERSION_SUBLEVEL := 2 VERSION_EXTRA := VERSION_NAME := VERSION_SO_MAJOR := 1 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/criu-1.5.1/cr-restore.c new/criu-1.5.2/cr-restore.c --- old/criu-1.5.1/cr-restore.c 2015-03-31 20:19:21.000000000 +0200 +++ new/criu-1.5.2/cr-restore.c 2015-04-28 08:07:09.000000000 +0200 @@ -1582,7 +1582,7 @@ for (i = 0; i < item->nr_threads; i++) { pid = item->threads[i].real; - if (item != root_item || !root_seized) { + if (item != root_item || !root_seized || i != 0) { if (ptrace(PTRACE_ATTACH, pid, 0, 0)) { pr_perror("Can't attach to %d", pid); return -1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/criu-1.5.1/cr-service.c new/criu-1.5.2/cr-service.c --- old/criu-1.5.1/cr-service.c 2015-03-31 20:19:21.000000000 +0200 +++ new/criu-1.5.2/cr-service.c 2015-04-28 08:07:09.000000000 +0200 @@ -7,6 +7,7 @@ #include <stdlib.h> #include <errno.h> #include <string.h> +#include <alloca.h> #include <sys/types.h> #include <sys/socket.h> #include <sys/un.h> @@ -36,12 +37,20 @@ unsigned int service_sk_ino = -1; -static int recv_criu_msg(int socket_fd, CriuReq **msg) +static int recv_criu_msg(int socket_fd, CriuReq **req) { - unsigned char buf[CR_MAX_MSG_SIZE]; + unsigned char *buf; int len; - len = read(socket_fd, buf, CR_MAX_MSG_SIZE); + len = recv(socket_fd, NULL, 0, MSG_TRUNC | MSG_PEEK); + if (len == -1) { + pr_perror("Can't read request"); + return -1; + } + + buf = alloca(len); + + len = recv(socket_fd, buf, len, MSG_TRUNC); if (len == -1) { pr_perror("Can't read request"); return -1; @@ -53,8 +62,8 @@ return -1; } - *msg = criu_req__unpack(NULL, len, buf); - if (!*msg) { + *req = criu_req__unpack(NULL, len, buf); + if (!*req) { pr_perror("Failed unpacking request"); return -1; } @@ -64,11 +73,13 @@ static int send_criu_msg(int socket_fd, CriuResp *msg) { - unsigned char buf[CR_MAX_MSG_SIZE]; + unsigned char *buf; int len; len = criu_resp__get_packed_size(msg); + buf = alloca(len); + if (criu_resp__pack(msg, buf) != len) { pr_perror("Failed packing response"); return -1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/criu-1.5.1/include/cr-service-const.h new/criu-1.5.2/include/cr-service-const.h --- old/criu-1.5.1/include/cr-service-const.h 2015-03-31 20:19:21.000000000 +0200 +++ new/criu-1.5.2/include/cr-service-const.h 2015-04-28 08:07:09.000000000 +0200 @@ -1,7 +1,6 @@ #ifndef __CR_SERVICE_CONST_H__ #define __CR_SERVICE_CONST_H__ -#define CR_MAX_MSG_SIZE 1024 #define CR_DEFAULT_SERVICE_ADDRESS "/var/run/criu_service.socket" #endif /* __CR_SERVICE_CONST_H__ */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/criu-1.5.1/lib/criu.c new/criu-1.5.2/lib/criu.c --- old/criu-1.5.1/lib/criu.c 2015-03-31 20:19:21.000000000 +0200 +++ new/criu-1.5.2/lib/criu.c 2015-04-28 08:07:09.000000000 +0200 @@ -10,6 +10,7 @@ #include <stdlib.h> #include <errno.h> #include <signal.h> +#include <alloca.h> #include "criu.h" #include "rpc.pb-c.h" @@ -311,13 +312,21 @@ static CriuResp *recv_resp(int socket_fd) { - unsigned char buf[CR_MAX_MSG_SIZE]; + unsigned char *buf; int len; CriuResp *msg = 0; - len = read(socket_fd, buf, CR_MAX_MSG_SIZE); + len = recv(socket_fd, NULL, 0, MSG_TRUNC | MSG_PEEK); if (len == -1) { - perror("Can't read response"); + perror("Can't read request"); + goto err; + } + + buf = alloca(len); + + len = recv(socket_fd, buf, len, MSG_TRUNC); + if (len == -1) { + perror("Can't read request"); goto err; } @@ -335,11 +344,13 @@ static int send_req(int socket_fd, CriuReq *req) { - unsigned char buf[CR_MAX_MSG_SIZE]; + unsigned char *buf; int len; len = criu_req__get_packed_size(req); + buf = alloca(len); + if (criu_req__pack(req, buf) != len) { perror("Failed packing request"); goto err;
participants (1)
-
root@hilbert.suse.de