[CRIU] [PATCH 1/1] do_new_mount() should clear all do_change_type() bits

Oleg Nesterov oleg at redhat.com
Mon Apr 13 08:40:42 PDT 2015


On 04/13, Tycho Andersen wrote:
>
> > --- a/mount.c
> > +++ b/mount.c
> > @@ -1750,6 +1750,9 @@ skip_parent:
> >  	return 0;
> >  }
> >  
> > +#define MS_CHANGE_TYPE_MASK	\
> > +	(MS_SHARED | MS_PRIVATE | MS_SLAVE | MS_UNBINDABLE)
> > +
> 
> If we unmask private and slave, should we pass something non-zero for
> those to restore_shared_options() below?

Yeeessss, I was thinking about the same.

But so far it is not clear to me what should we actually do.

I found this by code inspection, so far I can't reach this point, it
fails before, so I can't even test it...

I'll send another email a bit later, I need to switch to another
(non criu) problem temporary...

Thanks for looking at this!

> 
> >  static int do_new_mount(struct mount_info *mi)
> >  {
> >  	char *src;
> > @@ -1760,7 +1763,7 @@ static int do_new_mount(struct mount_info *mi)
> >  		return -1;
> >  
> >  	if (mount(src, mi->mountpoint, tp->name,
> > -			mi->flags & (~MS_SHARED), mi->options) < 0) {
> > +			mi->flags & ~MS_CHANGE_TYPE_MASK, mi->options) < 0) {
> >  		pr_perror("Can't mount at %s", mi->mountpoint);
> >  		return -1;
> >  	}
> > -- 
> > 1.5.5.1
> > 
> > 



More information about the CRIU mailing list