[CRIU] Re: [PATCH 2/3] files: Handle eventpoll files deferred

Cyrill Gorcunov gorcunov at openvz.org
Fri May 4 08:55:32 EDT 2012


On Fri, May 04, 2012 at 04:48:41PM +0400, Pavel Emelyanov wrote:
> On 05/04/2012 04:31 PM, Cyrill Gorcunov wrote:
> > Since event polling depends on other files
> > to be opened we split main files list into
> > two parst -- event poll files and all other
> > files, thus defer the creation of eventpoll
> > files in prepare_fds().
> > 
> > Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> 
> BTW, can you add a epoll fd to an epoll fd? If so, then we
> should probably have some more intelligent sorting here ;)

If there is attempt to add epollfd as a target to another
epollfd, the kernel tries to detect loops

	if (op == EPOLL_CTL_ADD) {
		if (is_file_epoll(tfile)) {
			error = -ELOOP;
			if (ep_loop_check(ep, tfile) != 0)
				goto error_tgt_fput;
		} else
			list_add(&tfile->f_tfile_llink, &tfile_check_list);
	}

but you're right, I need to think about sorting  more...

	Cyrill


More information about the CRIU mailing list