Btrfs: no slashes in subvolume names
authorChris Mason <chris.mason@oracle.com>
Tue, 12 Jun 2007 12:21:35 +0000 (08:21 -0400)
committerDavid Woodhouse <dwmw2@hera.kernel.org>
Tue, 12 Jun 2007 12:21:35 +0000 (08:21 -0400)
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/inode.c

index 62a3a778d37d72107428609e658dc200bcbe25de..1cabc1951b0ebbb014a9d70501c481fae050cdfd 100644 (file)
@@ -1831,6 +1831,8 @@ int btrfs_ioctl(struct inode *inode, struct file *filp, unsigned int
                namelen = strlen(vol_args.name);
                if (namelen > BTRFS_VOL_NAME_MAX)
                        return -EINVAL;
+               if (strchr(vol_args.name, '/'))
+                       return -EINVAL;
                path = btrfs_alloc_path();
                if (!path)
                        return -ENOMEM;