[CRIU] [PATCH 2/2] epoll: Handle epolls without targets
Cyrill Gorcunov
gorcunov at openvz.org
Tue Sep 11 17:21:57 EDT 2012
epoll might have no targets assigned so be
ready for that.
Reported-by: Andrew Vagin <avagin at parallels.com>
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
eventpoll.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/eventpoll.c b/eventpoll.c
index dd9d23f..347ada6 100644
--- a/eventpoll.c
+++ b/eventpoll.c
@@ -79,6 +79,7 @@ static int dump_eventpoll_entry(union fdinfo_entries *e, void *arg)
static int dump_one_eventpoll(int lfd, u32 id, const struct fd_parms *p)
{
EventpollFileEntry e = EVENTPOLL_FILE_ENTRY__INIT;
+ int ret;
e.id = id;
e.flags = p->flags;
@@ -89,7 +90,13 @@ static int dump_one_eventpoll(int lfd, u32 id, const struct fd_parms *p)
&e, PB_EVENTPOLL))
return -1;
- return parse_fdinfo(lfd, FD_TYPES__EVENTPOLL, false, dump_eventpoll_entry, &id);
+ ret = parse_fdinfo(lfd, FD_TYPES__EVENTPOLL, true, dump_eventpoll_entry, &id);
+ if (ret == -2) {
+ /* epoll created but no traget assigned */
+ ret = 0;
+ }
+
+ return ret;
}
static const struct fdtype_ops eventpoll_ops = {
--
1.7.7.6
More information about the CRIU
mailing list