driver core: handle user namespaces properly with the uid/gid devtmpfs change

Now that devtmpfs is caring about uid/gid, we need to use the correct
internal types so users who have USER_NS enabled will have things work
properly for them.

Thanks to Eric for pointing this out, and the patch review.

Reported-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Kay Sievers <kay@vrfy.org>
Cc: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Greg Kroah-Hartman
2013-04-11 11:43:29 -07:00
parent d81c8d19da
commit 4e4098a3e0
5 changed files with 20 additions and 20 deletions

View File

@@ -1112,7 +1112,7 @@ struct class block_class = {
};
static char *block_devnode(struct device *dev, umode_t *mode,
uid_t *uid, gid_t *gid)
kuid_t *uid, kgid_t *gid)
{
struct gendisk *disk = dev_to_disk(dev);