[CRIU] Re: [PATCH] sk-unix.c: Don't mangle name provided by diag
message if no mount point present
Cyrill Gorcunov
gorcunov at openvz.org
Thu Aug 30 11:01:31 EDT 2012
On Thu, Aug 30, 2012 at 06:54:39PM +0400, Cyrill Gorcunov wrote:
> > We should initialize mnt_root = open("/", O_RONLY)
>
> OK, letme try.
This should do the trick.
Cyrill
-------------- next part --------------
>From 988e965d6f1f706508348006c0d10f2e9b12af4f Mon Sep 17 00:00:00 2001
From: Cyrill Gorcunov <gorcunov at openvz.org>
Date: Thu, 30 Aug 2012 19:00:24 +0400
Subject: [PATCH] check: Don't forget to init mountns
Otherwise fstatat fails as
> $ ./crtools check
> Error (sk-unix.c: 283): Can't stat socket 12547 (./var/run/sdp): Bad file descriptor
Reported-by: "Muralidhar, Rajeev D" <rajeev.d.muralidhar at intel.com>
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
CC: Andrey Vagin <avagin at openvz.org>
---
cr-check.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/cr-check.c b/cr-check.c
index 5eefa74..cd0be8c 100644
--- a/cr-check.c
+++ b/cr-check.c
@@ -16,6 +16,7 @@
#include "files.h"
#include "sk-inet.h"
#include "proc_parse.h"
+#include "mount.h"
static int check_map_files(void)
{
@@ -334,6 +335,11 @@ int cr_check(void)
{
int ret = 0;
+ if (mntns_collect_root(getpid())) {
+ pr_err("Can't collect root mount point\n");
+ return -1;
+ }
+
ret |= check_map_files();
ret |= check_sock_diag();
ret |= check_ns_last_pid();
--
1.7.7.6
More information about the CRIU
mailing list