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

Cyrill Gorcunov gorcunov at openvz.org
Fri Mar 2 02:15:28 EST 2012


On Fri, Mar 02, 2012 at 11:10:13AM +0400, Cyrill Gorcunov wrote:
> Otherwise I'm getting errors like
> 
> CR_FD_SK_QUEUES
> ----------------
> Error (./include/util.h:102): Can't read img file: Bad file descriptor
> ----------------
> 

Maybe instead of adding OR here just create one global mask for that,
since before the patch we've had

static int cr_show_all(unsigned long pid, struct cr_options *opts)
{
	struct cr_fdset *cr_fdset = NULL;
	struct pstree_item *item = NULL;
	LIST_HEAD(pstree_list);
	int i, ret = -1;

--->	cr_fdset = cr_show_fdset_open(pid, CR_FD_DESC_PSTREE);
	if (!cr_fdset)
		goto out;

	ret = show_pstree(cr_fdset->fds[CR_FD_PSTREE], &pstree_list);
	if (ret)
		goto out;

--->	ret = show_sk_queues(cr_fdset->fds[CR_FD_SK_QUEUES]);

but noone opened CR_FD_SK_QUEUES yet.

	Cyrill


More information about the CRIU mailing list