diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-04-11 14:43:29 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-04-11 14:43:29 -0400 |
commit | 4e4098a3e08783cfd75f9fcdab276dc1d46931da (patch) | |
tree | d0befddb4d6f999a443ef60ae8af327bed046fd5 /include/linux/device.h | |
parent | d81c8d19da8fb6514c75d5c19334f4236856c561 (diff) |
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>
Diffstat (limited to 'include/linux/device.h')
-rw-r--r-- | include/linux/device.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index 851b85c7101e..88615ccaf23a 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -467,7 +467,7 @@ struct device_type { | |||
467 | const struct attribute_group **groups; | 467 | const struct attribute_group **groups; |
468 | int (*uevent)(struct device *dev, struct kobj_uevent_env *env); | 468 | int (*uevent)(struct device *dev, struct kobj_uevent_env *env); |
469 | char *(*devnode)(struct device *dev, umode_t *mode, | 469 | char *(*devnode)(struct device *dev, umode_t *mode, |
470 | uid_t *uid, gid_t *gid); | 470 | kuid_t *uid, kgid_t *gid); |
471 | void (*release)(struct device *dev); | 471 | void (*release)(struct device *dev); |
472 | 472 | ||
473 | const struct dev_pm_ops *pm; | 473 | const struct dev_pm_ops *pm; |
@@ -845,7 +845,7 @@ extern int device_rename(struct device *dev, const char *new_name); | |||
845 | extern int device_move(struct device *dev, struct device *new_parent, | 845 | extern int device_move(struct device *dev, struct device *new_parent, |
846 | enum dpm_order dpm_order); | 846 | enum dpm_order dpm_order); |
847 | extern const char *device_get_devnode(struct device *dev, | 847 | extern const char *device_get_devnode(struct device *dev, |
848 | umode_t *mode, uid_t *uid, gid_t *gid, | 848 | umode_t *mode, kuid_t *uid, kgid_t *gid, |
849 | const char **tmp); | 849 | const char **tmp); |
850 | extern void *dev_get_drvdata(const struct device *dev); | 850 | extern void *dev_get_drvdata(const struct device *dev); |
851 | extern int dev_set_drvdata(struct device *dev, void *data); | 851 | extern int dev_set_drvdata(struct device *dev, void *data); |