浏览代码

[POWERPC] spufs: fail spu_create with invalid flags

At this time, all flags are invalid. Since we are
planning to actually add valid flags in the future,
we better check if any were passed by the user.

Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arnd@arndb.de 19 年之前
父节点
当前提交
c983294872
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      arch/powerpc/platforms/cell/spufs/inode.c

+ 4 - 0
arch/powerpc/platforms/cell/spufs/inode.c

@@ -304,6 +304,10 @@ long spufs_create_thread(struct nameidata *nd,
 	    nd->dentry != nd->dentry->d_sb->s_root)
 		goto out;
 
+	/* all flags are reserved */
+	if (flags)
+		goto out;
+
 	dentry = lookup_create(nd, 1);
 	ret = PTR_ERR(dentry);
 	if (IS_ERR(dentry))