Btrfs: no slashes in subvolume names
Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
parent
5af3981c18
commit
8a712645c3
@ -1831,6 +1831,8 @@ int btrfs_ioctl(struct inode *inode, struct file *filp, unsigned int
|
|||||||
namelen = strlen(vol_args.name);
|
namelen = strlen(vol_args.name);
|
||||||
if (namelen > BTRFS_VOL_NAME_MAX)
|
if (namelen > BTRFS_VOL_NAME_MAX)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
if (strchr(vol_args.name, '/'))
|
||||||
|
return -EINVAL;
|
||||||
path = btrfs_alloc_path();
|
path = btrfs_alloc_path();
|
||||||
if (!path)
|
if (!path)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user