[CRIU] [crtools-bot for Kinsbursky Stanislav ] ipc: added error print in case of shm obj read failure

Cyrill Gorcunov gorcunov at openvz.org
Fri Feb 10 07:00:43 EST 2012


The commit is pushed to "master" and will appear on git://github.com/cyrillos/crtools.git
------>
commit 0f1b3229a357e86665f0d15c82b57c47f4e077a1
Author: Kinsbursky Stanislav <skinsbursky at openvz.org>
Date:   Fri Feb 10 13:16:49 2012 +0300

    ipc: added error print in case of shm obj read failure
    
    Signed-off-by: Stanislav Kinsbursky <skinsbursky at parallels.com>
    Acked-by: Pavel Emelyanov <xemul at parallels.com>
    Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 ipc_ns.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/ipc_ns.c b/ipc_ns.c
index cb40b9a..686c225 100644
--- a/ipc_ns.c
+++ b/ipc_ns.c
@@ -372,8 +372,10 @@ static int prepare_ipc_shm(int pid)
 		struct ipc_shm_entry shm;
 
 		ret = read_img_eof(fd, &shm);
-		if (ret < 0)
+		if (ret < 0) {
+			pr_err("Failed to read IPC shared memory object\n");
 			return -EIO;
+		}
 		if (ret == 0)
 			break;
 


More information about the CRIU mailing list