[CRIU] [PATCH] show: Don't forget to open sockets queue descriptor before accessing it

Cyrill Gorcunov gorcunov at openvz.org
Fri Mar 2 02:10:13 EST 2012


Otherwise I'm getting errors like

CR_FD_SK_QUEUES
----------------
Error (./include/util.h:102): Can't read img file: Bad file descriptor
----------------

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 cr-show.c         |    2 +-
 include/crtools.h |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/cr-show.c b/cr-show.c
index 9c9e2d6..eeb7042 100644
--- a/cr-show.c
+++ b/cr-show.c
@@ -551,7 +551,7 @@ static int cr_show_all(unsigned long pid, struct cr_options *opts)
 	LIST_HEAD(pstree_list);
 	int i, ret = -1;
 
-	cr_fdset = cr_show_fdset_open(pid, CR_FD_DESC_PSTREE);
+	cr_fdset = cr_show_fdset_open(pid, CR_FD_DESC_PSTREE | CR_FD_DESC_SK_QUEUES);
 	if (!cr_fdset)
 		goto out;
 
diff --git a/include/crtools.h b/include/crtools.h
index 175f371..e110218 100644
--- a/include/crtools.h
+++ b/include/crtools.h
@@ -101,6 +101,7 @@ struct cr_fdset {
 #define CR_FD_DESC_USE(type)		((1 << (type)))
 #define CR_FD_DESC_CORE			CR_FD_DESC_USE(CR_FD_CORE)
 #define CR_FD_DESC_PSTREE		CR_FD_DESC_USE(CR_FD_PSTREE)
+#define CR_FD_DESC_SK_QUEUES		CR_FD_DESC_USE(CR_FD_SK_QUEUES)
 #define CR_FD_DESC_TASK				(\
 	CR_FD_DESC_USE(CR_FD_FDINFO)		|\
 	CR_FD_DESC_USE(CR_FD_PAGES)		|\
-- 
1.7.7.6



More information about the CRIU mailing list