[CRIU] [crtools-bot] restore: fix length of spliced data

Cyrill Gorcunov gorcunov at openvz.org
Wed Feb 1 08:19:42 EST 2012


The commit is pushed to "master" and will appear on git://github.com/cyrillos/crtools.git
------>
commit 3f614e449896ff53628b9e5ed90a9c3ca457ad7c
Author: Andrey Vagin <avagin at openvz.org>
Date:   Wed Feb 1 16:02:02 2012 +0300

    restore: fix length of spliced data
    
    Signed-off-by: Andrey Vagin <avagin at openvz.org>
    Acked-by: Pavel Emelyanov <xemul at parallels.com>
    Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 cr-restore.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/cr-restore.c b/cr-restore.c
index 63e28ba..0aeedfd 100644
--- a/cr-restore.c
+++ b/cr-restore.c
@@ -778,7 +778,7 @@ static int restore_pipe_data(struct pipe_entry *e, int wfd, int pipes_fd)
 	pr_info("\t%x: Splicing data to %d\n", e->pipeid, wfd);
 
 	while (size != e->bytes) {
-		ret = splice(pipes_fd, NULL, wfd, NULL, e->bytes, 0);
+		ret = splice(pipes_fd, NULL, wfd, NULL, e->bytes - size, 0);
 		if (ret < 0) {
 			pr_perror("\t%x: Error splicing data", e->pipeid);
 			return -1;


More information about the CRIU mailing list