The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxc/pull/1005

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
I think (?) this may be related to our hanging monitor bug. Let's do this
anyway, as it's probably a good idea.

Signed-off-by: Tycho Andersen <tycho.ander...@canonical.com>
From fcd59cf0c84f1523768da0377d260c65c090e650 Mon Sep 17 00:00:00 2001
From: Tycho Andersen <tycho.ander...@canonical.com>
Date: Fri, 6 May 2016 11:21:39 -0500
Subject: [PATCH] sync: fail on unexpected message sizes

I think (?) this may be related to our hanging monitor bug. Let's do this
anyway, as it's probably a good idea.

Signed-off-by: Tycho Andersen <tycho.ander...@canonical.com>
---
 src/lxc/sync.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/lxc/sync.c b/src/lxc/sync.c
index f06d302..82f68e3 100644
--- a/src/lxc/sync.c
+++ b/src/lxc/sync.c
@@ -47,6 +47,11 @@ static int __sync_wait(int fd, int sequence)
        if (!ret)
                return 0;
 
+       if (ret != sizeof(sync)) {
+               ERROR("unexpected sync size: %d expected %lu", ret, 
sizeof(sync));
+               return -1;
+       }
+
        if (sync == LXC_SYNC_ERROR) {
                ERROR("An error occurred in another process "
                      "(expected sequence number %d)", sequence);
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to