diff options
| author | Borislav Petkov <bp@suse.de> | 2021-03-18 18:43:11 +0300 | 
|---|---|---|
| committer | Borislav Petkov <bp@suse.de> | 2021-03-18 18:43:11 +0300 | 
| commit | afb4a37778491eae010a43edebea32ff2d45f01c (patch) | |
| tree | c40bcc6143e5542134477dd96a108d24b1f9074f /security/commoncap.c | |
| parent | 229164175ff0c61ff581e6bf37fbfcb608b6e9bb (diff) | |
| parent | 1e28eed17697bcf343c6743f0028cc3b5dd88bf0 (diff) | |
| download | linux-afb4a37778491eae010a43edebea32ff2d45f01c.tar.xz | |
Merge tag 'v5.12-rc3' into x86/seves
Pick up dependent SEV-ES urgent changes which went into -rc3 to base new
work ontop.
Signed-off-by: Borislav Petkov <bp@suse.de>
Diffstat (limited to 'security/commoncap.c')
| -rw-r--r-- | security/commoncap.c | 12 | 
1 files changed, 1 insertions, 11 deletions
diff --git a/security/commoncap.c b/security/commoncap.c index 28f4d25480df..1c519c875217 100644 --- a/security/commoncap.c +++ b/security/commoncap.c @@ -543,8 +543,7 @@ int cap_convert_nscap(struct user_namespace *mnt_userns, struct dentry *dentry,  	__u32 magic, nsmagic;  	struct inode *inode = d_backing_inode(dentry);  	struct user_namespace *task_ns = current_user_ns(), -		*fs_ns = inode->i_sb->s_user_ns, -		*ancestor; +		*fs_ns = inode->i_sb->s_user_ns;  	kuid_t rootid;  	size_t newsize; @@ -567,15 +566,6 @@ int cap_convert_nscap(struct user_namespace *mnt_userns, struct dentry *dentry,  	if (nsrootid == -1)  		return -EINVAL; -	/* -	 * Do not allow allow adding a v3 filesystem capability xattr -	 * if the rootid field is ambiguous. -	 */ -	for (ancestor = task_ns->parent; ancestor; ancestor = ancestor->parent) { -		if (from_kuid(ancestor, rootid) == 0) -			return -EINVAL; -	} -  	newsize = sizeof(struct vfs_ns_cap_data);  	nscap = kmalloc(newsize, GFP_ATOMIC);  	if (!nscap)  | 
