userns: Convert gadgetfs to use kuid and kgid where appropriate
authorEric W. Biederman <ebiederm@xmission.com>
Wed, 8 Feb 2012 00:32:04 +0000 (16:32 -0800)
committerEric W. Biederman <ebiederm@xmission.com>
Fri, 21 Sep 2012 10:12:16 +0000 (03:12 -0700)
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Felipe Balbi <balbi@ti.com>
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
drivers/usb/gadget/inode.c
init/Kconfig

index e58b1644297172a8c1136fc78b2aea802df17f41..7bd36c80be5f530e64c26921928fbda79e01125d 100644 (file)
@@ -1988,8 +1988,8 @@ gadgetfs_make_inode (struct super_block *sb,
        if (inode) {
                inode->i_ino = get_next_ino();
                inode->i_mode = mode;
-               inode->i_uid = default_uid;
-               inode->i_gid = default_gid;
+               inode->i_uid = make_kuid(&init_user_ns, default_uid);
+               inode->i_gid = make_kgid(&init_user_ns, default_gid);
                inode->i_atime = inode->i_mtime = inode->i_ctime
                                = CURRENT_TIME;
                inode->i_private = data;
index 60bdff259b27113243da4ca885691b74f4e26d9d..633bde28c8ce05089a59d04218a943dbc63123ca 100644 (file)
@@ -932,7 +932,6 @@ config UIDGID_CONVERTED
        depends on NET_9P = n
 
        # Filesystems
-       depends on USB_GADGETFS = n
        depends on USB_FUNCTIONFS = n
        depends on DEVTMPFS = n
        depends on XENFS = n