ソースを参照

Btrfs: no slashes in subvolume names

Signed-off-by: Chris Mason <chris.mason@oracle.com>
Chris Mason 18 年 前
コミット
8a712645c3
1 ファイル変更2 行追加0 行削除
  1. 2 0
      fs/btrfs/inode.c

+ 2 - 0
fs/btrfs/inode.c

@@ -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;