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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:	Fri, 8 Nov 2013 17:49:53 +1100
From:	Stephen Rothwell <sfr@...b.auug.org.au>
To:	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Al Viro <viro@...IV.linux.org.uk>
Cc:	linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
	"J. Bruce Fields" <bfields@...hat.com>
Subject: linux-next: manual merge of the userns tree with the vfs tree

Hi Eric,

Today's linux-next merge of the userns tree got a conflict in fs/namei.c
between commits 45b1139e249d ("namei: minor vfs_unlink cleanup"),
0e22d7c4652b ("locks: break delegations on unlink"), 5d375b9f8afb
("locks: helper functions for delegation breaking") and 909b30216356
("locks: break delegations on rename") from the vfs tree and commit
40216baa0101 ("vfs: Lazily remove mounts on unlinked files and
directories. v2") from the userns tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwell                    sfr@...b.auug.org.au

diff --cc fs/namei.c
index a4a30e396136,a12c1d31d4c8..000000000000
--- a/fs/namei.c
+++ b/fs/namei.c
@@@ -3645,22 -3670,16 +3659,20 @@@ int vfs_unlink(struct inode *dir, struc
  	if (!dir->i_op->unlink)
  		return -EPERM;
  
 -	mutex_lock(&dentry->d_inode->i_mutex);
 +	mutex_lock(&target->i_mutex);
- 	if (d_mountpoint(dentry))
- 		error = -EBUSY;
- 	else {
- 		error = security_inode_unlink(dir, dentry);
+ 	error = security_inode_unlink(dir, dentry);
+ 	if (!error) {
++		error = try_break_deleg(target, delegated_inode);
++		if (error)
++			goto out;
+ 		error = dir->i_op->unlink(dir, dentry);
  		if (!error) {
- 			error = try_break_deleg(target, delegated_inode);
- 			if (error)
- 				goto out;
- 			error = dir->i_op->unlink(dir, dentry);
- 			if (!error)
- 				dont_mount(dentry);
+ 			dont_mount(dentry);
+ 			detach_mounts(dentry);
  		}
  	}
 -	mutex_unlock(&dentry->d_inode->i_mutex);
 +out:
 +	mutex_unlock(&target->i_mutex);
  
  	/* We don't d_delete() NFS sillyrenamed files--they still exist. */
  	if (!error && !(dentry->d_flags & DCACHE_NFSFS_RENAMED)) {
@@@ -3708,8 -3726,11 +3720,11 @@@ retry_deleg
  		if (nd.last.name[nd.last.len])
  			goto slashes;
  		inode = dentry->d_inode;
 -		if (!inode)
 +		if (d_is_negative(dentry))
  			goto slashes;
+ 		error = -EBUSY;
+ 		if (covered(nd.path.mnt, dentry))
+ 			goto exit2;
  		ihold(inode);
  		error = security_path_unlink(&nd.path, dentry);
  		if (error)
@@@ -4063,20 -4040,9 +4075,16 @@@ static int vfs_rename_other(struct inod
  		return error;
  
  	dget(new_dentry);
 -	if (target)
 -		mutex_lock(&target->i_mutex);
 +	lock_two_nondirectories(source, target);
  
- 	error = -EBUSY;
- 	if (d_mountpoint(old_dentry)||d_mountpoint(new_dentry))
- 		goto out;
- 
 +	error = try_break_deleg(source, delegated_inode);
 +	if (error)
 +		goto out;
 +	if (target) {
 +		error = try_break_deleg(target, delegated_inode);
 +		if (error)
 +			goto out;
 +	}
  	error = old_dir->i_op->rename(old_dir, old_dentry, new_dir, new_dentry);
  	if (error)
  		goto out;

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists