diff options
Diffstat (limited to 'fs/proc/array.c')
-rw-r--r-- | fs/proc/array.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/proc/array.c b/fs/proc/array.c index f9bd395b3473..36a0a9192ece 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c | |||
@@ -81,6 +81,7 @@ | |||
81 | #include <linux/pid_namespace.h> | 81 | #include <linux/pid_namespace.h> |
82 | #include <linux/ptrace.h> | 82 | #include <linux/ptrace.h> |
83 | #include <linux/tracehook.h> | 83 | #include <linux/tracehook.h> |
84 | #include <linux/user_namespace.h> | ||
84 | 85 | ||
85 | #include <asm/pgtable.h> | 86 | #include <asm/pgtable.h> |
86 | #include <asm/processor.h> | 87 | #include <asm/processor.h> |
@@ -161,6 +162,7 @@ static inline const char *get_task_state(struct task_struct *tsk) | |||
161 | static inline void task_state(struct seq_file *m, struct pid_namespace *ns, | 162 | static inline void task_state(struct seq_file *m, struct pid_namespace *ns, |
162 | struct pid *pid, struct task_struct *p) | 163 | struct pid *pid, struct task_struct *p) |
163 | { | 164 | { |
165 | struct user_namespace *user_ns = current_user_ns(); | ||
164 | struct group_info *group_info; | 166 | struct group_info *group_info; |
165 | int g; | 167 | int g; |
166 | struct fdtable *fdt = NULL; | 168 | struct fdtable *fdt = NULL; |
@@ -205,7 +207,8 @@ static inline void task_state(struct seq_file *m, struct pid_namespace *ns, | |||
205 | task_unlock(p); | 207 | task_unlock(p); |
206 | 208 | ||
207 | for (g = 0; g < min(group_info->ngroups, NGROUPS_SMALL); g++) | 209 | for (g = 0; g < min(group_info->ngroups, NGROUPS_SMALL); g++) |
208 | seq_printf(m, "%d ", GROUP_AT(group_info, g)); | 210 | seq_printf(m, "%d ", |
211 | from_kgid_munged(user_ns, GROUP_AT(group_info, g))); | ||
209 | put_cred(cred); | 212 | put_cred(cred); |
210 | 213 | ||
211 | seq_putc(m, '\n'); | 214 | seq_putc(m, '\n'); |