diff options
Diffstat (limited to 'include/linux/utsname.h')
-rw-r--r-- | include/linux/utsname.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/linux/utsname.h b/include/linux/utsname.h index 69f39974c041..4e5b0213fdc1 100644 --- a/include/linux/utsname.h +++ b/include/linux/utsname.h | |||
@@ -37,9 +37,13 @@ struct new_utsname { | |||
37 | #include <linux/nsproxy.h> | 37 | #include <linux/nsproxy.h> |
38 | #include <linux/err.h> | 38 | #include <linux/err.h> |
39 | 39 | ||
40 | struct user_namespace; | ||
41 | extern struct user_namespace init_user_ns; | ||
42 | |||
40 | struct uts_namespace { | 43 | struct uts_namespace { |
41 | struct kref kref; | 44 | struct kref kref; |
42 | struct new_utsname name; | 45 | struct new_utsname name; |
46 | struct user_namespace *user_ns; | ||
43 | }; | 47 | }; |
44 | extern struct uts_namespace init_uts_ns; | 48 | extern struct uts_namespace init_uts_ns; |
45 | 49 | ||
@@ -50,7 +54,7 @@ static inline void get_uts_ns(struct uts_namespace *ns) | |||
50 | } | 54 | } |
51 | 55 | ||
52 | extern struct uts_namespace *copy_utsname(unsigned long flags, | 56 | extern struct uts_namespace *copy_utsname(unsigned long flags, |
53 | struct uts_namespace *ns); | 57 | struct task_struct *tsk); |
54 | extern void free_uts_ns(struct kref *kref); | 58 | extern void free_uts_ns(struct kref *kref); |
55 | 59 | ||
56 | static inline void put_uts_ns(struct uts_namespace *ns) | 60 | static inline void put_uts_ns(struct uts_namespace *ns) |
@@ -67,12 +71,12 @@ static inline void put_uts_ns(struct uts_namespace *ns) | |||
67 | } | 71 | } |
68 | 72 | ||
69 | static inline struct uts_namespace *copy_utsname(unsigned long flags, | 73 | static inline struct uts_namespace *copy_utsname(unsigned long flags, |
70 | struct uts_namespace *ns) | 74 | struct task_struct *tsk) |
71 | { | 75 | { |
72 | if (flags & CLONE_NEWUTS) | 76 | if (flags & CLONE_NEWUTS) |
73 | return ERR_PTR(-EINVAL); | 77 | return ERR_PTR(-EINVAL); |
74 | 78 | ||
75 | return ns; | 79 | return tsk->nsproxy->uts_ns; |
76 | } | 80 | } |
77 | #endif | 81 | #endif |
78 | 82 | ||