lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 30 Sep 2010 17:33:42 -0700
From:	Ram Pai <linuxram@...ibm.com>
To:	Valerie Aurora <vaurora@...hat.com>
Cc:	Miklos Szeredi <miklos@...redi.hu>, viro@...iv.linux.org.uk,
	hch@...radead.org, agruen@...e.de, npiggin@...nel.dk,
	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH 01/34] VFS: Make clone_mnt() and copy_tree() return
 error codes

On Thu, Sep 30, 2010 at 05:44:18PM -0400, Valerie Aurora wrote:
> (Resend with correct email for Ram Pai)
> 
> On Thu, Sep 30, 2010 at 11:51:30AM +0200, Miklos Szeredi wrote:
> > On Thu, 16 Sep 2010, Valerie Aurora wrote:
> > > copy_tree() can theoretically fail in a case other than ENOMEM, but
> > > always returns NULL which is interpreted by callers as -ENOMEM.
> > > Convert to return an explicit error.  Convert clone_mnt() for
> > > consistency and because union mounts will add new error cases.
> > 
> > I think it makes sense to push this fix to 2.6.37 independently of the
> > other patches.
> > 
> > Acked-by: Miklos Szeredi <mszeredi@...e.cz>
> 
> I'm certainly not going to argue, but I spent an hour trying to
> trigger the non-ENOMEM case (below) and failed - maybe it's
> unreachable?
> 
> > > @@ -1212,11 +1216,12 @@ struct vfsmount *copy_tree(struct vfsmount *mnt, struct dentry *dentry,
> > >  	struct path path;
> > >  
> > >  	if (!(flag & CL_COPY_ALL) && IS_MNT_UNBINDABLE(mnt))
> > > -		return NULL;
> > > +		return ERR_PTR(-EINVAL);
> 
> Ram, do you remember how this worked?

Oops. That should be a OR condition. there is one other check in that
function that should also be a OR condition.

BTW: the return value has to be NULL. right? because its not an error
to clone a unbindable mount. Nor is it an error to not specify CL_COPY_ALL.
It just means that you want nothing in return.

RP
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ