]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - fs/xfs/xfs_ioctl.c
Merge tag 'kgdb-5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/danielt/linux
[linux.git] / fs / xfs / xfs_ioctl.c
index e6f1e47397582986b8de33205376a151ce3cb247..d58f0d6a699e672cfec235a02d8f032051f4facc 100644 (file)
@@ -67,7 +67,7 @@ xfs_find_handle(
                        return -EBADF;
                inode = file_inode(f.file);
        } else {
-               error = user_lpath((const char __user *)hreq->path, &path);
+               error = user_path_at(AT_FDCWD, hreq->path, 0, &path);
                if (error)
                        return error;
                inode = d_inode(path.dentry);
@@ -438,7 +438,7 @@ xfs_attrmulti_attr_get(
        if (!kbuf)
                return -ENOMEM;
 
-       error = xfs_attr_get(XFS_I(inode), name, kbuf, (int *)len, flags);
+       error = xfs_attr_get(XFS_I(inode), name, &kbuf, (int *)len, flags);
        if (error)
                goto out_kfree;
 
@@ -1038,6 +1038,10 @@ xfs_ioc_ag_geometry(
 
        if (copy_from_user(&ageo, arg, sizeof(ageo)))
                return -EFAULT;
+       if (ageo.ag_flags)
+               return -EINVAL;
+       if (memchr_inv(&ageo.ag_reserved, 0, sizeof(ageo.ag_reserved)))
+               return -EINVAL;
 
        error = xfs_ag_get_geometry(mp, ageo.ag_number, &ageo);
        if (error)
@@ -1309,8 +1313,7 @@ xfs_ioctl_setattr_dax_invalidate(
        if (fa->fsx_xflags & FS_XFLAG_DAX) {
                if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode)))
                        return -EINVAL;
-               if (S_ISREG(inode->i_mode) &&
-                   !bdev_dax_supported(xfs_find_bdev_for_inode(VFS_I(ip)),
+               if (!bdev_dax_supported(xfs_find_bdev_for_inode(VFS_I(ip)),
                                sb->s_blocksize))
                        return -EINVAL;
        }