[linux-yocto] [PATCH 12/57] arch/arm/mach-axxia: Updates to the VMFS File System

Bruce Ashfield bruce.ashfield at windriver.com
Tue Mar 18 14:31:31 PDT 2014


Minor 'nit as well. What was the symptom when it was broken ? A build
failure ? runtime issue ? We should capture that in the commit message.

Bruce

On 14-03-18 12:56 AM, Charlie Paul wrote:
> From: John Jacques <john.jacques at lsi.com>
>
> Updated to work when CONFIG_UIDGID_STRICT_TYPE_CHECKS is
> not defined.
>
> Signed-off-by: John Jacques <john.jacques at lsi.com>
> ---
>   fs/vmfs/inode.c |   18 ++++++++++++++++--
>   fs/vmfs/ioctl.c |    8 ++++++++
>   2 files changed, 24 insertions(+), 2 deletions(-)
>
> diff --git a/fs/vmfs/inode.c b/fs/vmfs/inode.c
> index 713da0d..099bd76 100644
> --- a/fs/vmfs/inode.c
> +++ b/fs/vmfs/inode.c
> @@ -486,11 +486,25 @@ int vmfs_notify_change(struct dentry *dentry, struct iattr *attr)
>   		goto out;
>
>   	error = -EPERM;
> -	if ((attr->ia_valid & ATTR_UID) && ((attr->ia_uid).val != (server->mnt->uid).val))
> +#ifdef CONFIG_UIDGID_STRICT_TYPE_CHECKS
> +	if ((attr->ia_valid & ATTR_UID) &&
> +	    (attr->ia_uid.val != (server->mnt->uid).val))
>   		goto out;
> +#else
> +	if ((attr->ia_valid & ATTR_UID) &&
> +	    (attr->ia_uid != server->mnt->uid))
> +		goto out;
> +#endif
>
> -	if ((attr->ia_valid & ATTR_GID) && ((attr->ia_gid).val != (server->mnt->gid).val))
> +#ifdef CONFIG_UIDGID_STRICT_TYPE_CHECKS
> +	if ((attr->ia_valid & ATTR_GID) &&
> +	    ((attr->ia_gid).val != (server->mnt->gid).val))
>   		goto out;
> +#else
> +	if ((attr->ia_valid & ATTR_GID) &&
> +	    (attr->ia_gid != server->mnt->gid))
> +		goto out;
> +#endif
>
>   	if ((attr->ia_valid & ATTR_MODE) && (attr->ia_mode & ~mask))
>   		goto out;
> diff --git a/fs/vmfs/ioctl.c b/fs/vmfs/ioctl.c
> index 988e69c..798df63 100644
> --- a/fs/vmfs/ioctl.c
> +++ b/fs/vmfs/ioctl.c
> @@ -34,11 +34,19 @@ long vmfs_unlocked_ioctl(struct file *filp, unsigned int cmd,
>   		uid16_t uid16;
>   		uid_t uid32;
>   	case VMFS_IOC_GETMOUNTUID:
> +#ifdef CONFIG_UIDGID_STRICT_TYPE_CHECKS
>   		SET_UID(uid16, (server->mnt->mounted_uid).val);
> +#else
> +		SET_UID(uid16, server->mnt->mounted_uid);
> +#endif
>   		result = put_user(uid16, (uid16_t __user *) arg);
>   		break;
>   	case VMFS_IOC_GETMOUNTUID32:
> +#ifdef CONFIG_UIDGID_STRICT_TYPE_CHECKS
>   		SET_UID(uid32, (server->mnt->mounted_uid).val);
> +#else
> +		SET_UID(uid32, server->mnt->mounted_uid);
> +#endif
>   		result = put_user(uid32, (uid_t __user *) arg);
>   		break;
>   	default:
>



More information about the linux-yocto mailing list