Re: NFS regression in 3.2.60

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2014-09-24 at 08:47 +0200, Sergio Gelato wrote:
> BugLink: http://bugs.launchpad.net/bugs/1348670
> 
> Fix regression introduced in pre-3.14 kernels by cherry-picking
> aa07c713ecfc0522916f3cd57ac628ea6127c0ec
> (NFSD: Call ->set_acl with a NULL ACL structure if no entries).
> 
> The affected code was removed in 3.14 by commit
> 4ac7249ea5a0ceef9f8269f63f33cc873c3fac61
> (nfsd: use get_acl and ->set_acl).
> The ->set_acl methods are already able to cope with a NULL argument.

Queued up for 3.2, thanks.

Ben.

> Signed-off-by: Sergio Gelato <Sergio.Gelato@xxxxxxxxxxx>
> ---
>  fs/nfsd/vfs.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
> index 446dc01..fc208e4 100644
> --- a/fs/nfsd/vfs.c
> +++ b/fs/nfsd/vfs.c
> @@ -450,6 +450,9 @@ set_nfsv4_acl_one(struct dentry *dentry, struct posix_acl *pacl, char *key)
>  	char *buf = NULL;
>  	int error = 0;
>  
> +	if (!pacl)
> +		return vfs_setxattr(dentry, key, NULL, 0, 0);
> +
>  	buflen = posix_acl_xattr_size(pacl->a_count);
>  	buf = kmalloc(buflen, GFP_KERNEL);
>  	error = -ENOMEM;

-- 
Ben Hutchings
The world is coming to an end.	Please log off.

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]