[CRIU] [PATCH 6/7] files: Add c/r for /proc/$pid/ns/$ids references

Cyrill Gorcunov gorcunov at openvz.org
Thu May 9 14:55:15 EDT 2013


On Thu, May 09, 2013 at 09:57:50PM +0400, Pavel Emelyanov wrote:
> > +static int open_ns_fd(struct file_desc *d)
> > +{
> > +	struct ns_file_info *nfi = container_of(d, struct ns_file_info, d);
> > +	struct ns_proc_entry *ns_proc_entry = NULL;
> > +	struct pstree_item *item, *t;
> > +	char path[64];
> > +	int fd;
> > +
> > +#define __ns_match(_name)		\
> > +	ids->has_##_name &&		\
> > +	ids->_name == nfi->nfe->ns_id
> 
> Macro referencing stuff from stack is bad idea.

This is small area for macro usage, but if you don't
like, sure I'll update.

	Cyrill


More information about the CRIU mailing list