summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms
diff options
context:
space:
mode:
authorDwight Engen <dwight.engen@oracle.com>2013-08-21 20:33:51 +0200
committerBen Myers <bpm@sgi.com>2013-08-21 22:17:54 +0200
commited56f34f11da4f491680cd39482fd533134fd589 (patch)
treefb409b0c2418249ca975bc8fe6311893a0f9e12f /arch/powerpc/platforms
parentxfs: Add support for the Q_XGETQSTATV (diff)
downloadlinux-ed56f34f11da4f491680cd39482fd533134fd589.tar.xz
linux-ed56f34f11da4f491680cd39482fd533134fd589.zip
powerpc/spufs: convert userns uid/gid mount options to kuid/kgid
Acked-by: Jeremy Kerr <jk@ozlabs.org> Tested-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Dwight Engen <dwight.engen@oracle.com> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r--arch/powerpc/platforms/cell/spufs/inode.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c
index f3900427ffab..87ba7cf99cd7 100644
--- a/arch/powerpc/platforms/cell/spufs/inode.c
+++ b/arch/powerpc/platforms/cell/spufs/inode.c
@@ -620,12 +620,16 @@ spufs_parse_options(struct super_block *sb, char *options, struct inode *root)
case Opt_uid:
if (match_int(&args[0], &option))
return 0;
- root->i_uid = option;
+ root->i_uid = make_kuid(current_user_ns(), option);
+ if (!uid_valid(root->i_uid))
+ return 0;
break;
case Opt_gid:
if (match_int(&args[0], &option))
return 0;
- root->i_gid = option;
+ root->i_gid = make_kgid(current_user_ns(), option);
+ if (!gid_valid(root->i_gid))
+ return 0;
break;
case Opt_mode:
if (match_octal(&args[0], &option))