diff options
Diffstat (limited to 'fs/proc/array.c')
-rw-r--r-- | fs/proc/array.c | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/fs/proc/array.c b/fs/proc/array.c index 1295a00ca316..fd02a9ebfc30 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c | |||
@@ -99,8 +99,8 @@ static inline void task_name(struct seq_file *m, struct task_struct *p) | |||
99 | buf = m->buf + m->count; | 99 | buf = m->buf + m->count; |
100 | 100 | ||
101 | /* Ignore error for now */ | 101 | /* Ignore error for now */ |
102 | string_escape_str(tcomm, &buf, m->size - m->count, | 102 | buf += string_escape_str(tcomm, buf, m->size - m->count, |
103 | ESCAPE_SPACE | ESCAPE_SPECIAL, "\n\\"); | 103 | ESCAPE_SPACE | ESCAPE_SPECIAL, "\n\\"); |
104 | 104 | ||
105 | m->count = buf - m->buf; | 105 | m->count = buf - m->buf; |
106 | seq_putc(m, '\n'); | 106 | seq_putc(m, '\n'); |
@@ -188,6 +188,24 @@ static inline void task_state(struct seq_file *m, struct pid_namespace *ns, | |||
188 | from_kgid_munged(user_ns, GROUP_AT(group_info, g))); | 188 | from_kgid_munged(user_ns, GROUP_AT(group_info, g))); |
189 | put_cred(cred); | 189 | put_cred(cred); |
190 | 190 | ||
191 | #ifdef CONFIG_PID_NS | ||
192 | seq_puts(m, "\nNStgid:"); | ||
193 | for (g = ns->level; g <= pid->level; g++) | ||
194 | seq_printf(m, "\t%d", | ||
195 | task_tgid_nr_ns(p, pid->numbers[g].ns)); | ||
196 | seq_puts(m, "\nNSpid:"); | ||
197 | for (g = ns->level; g <= pid->level; g++) | ||
198 | seq_printf(m, "\t%d", | ||
199 | task_pid_nr_ns(p, pid->numbers[g].ns)); | ||
200 | seq_puts(m, "\nNSpgid:"); | ||
201 | for (g = ns->level; g <= pid->level; g++) | ||
202 | seq_printf(m, "\t%d", | ||
203 | task_pgrp_nr_ns(p, pid->numbers[g].ns)); | ||
204 | seq_puts(m, "\nNSsid:"); | ||
205 | for (g = ns->level; g <= pid->level; g++) | ||
206 | seq_printf(m, "\t%d", | ||
207 | task_session_nr_ns(p, pid->numbers[g].ns)); | ||
208 | #endif | ||
191 | seq_putc(m, '\n'); | 209 | seq_putc(m, '\n'); |
192 | } | 210 | } |
193 | 211 | ||
@@ -614,7 +632,9 @@ static int children_seq_show(struct seq_file *seq, void *v) | |||
614 | pid_t pid; | 632 | pid_t pid; |
615 | 633 | ||
616 | pid = pid_nr_ns(v, inode->i_sb->s_fs_info); | 634 | pid = pid_nr_ns(v, inode->i_sb->s_fs_info); |
617 | return seq_printf(seq, "%d ", pid); | 635 | seq_printf(seq, "%d ", pid); |
636 | |||
637 | return 0; | ||
618 | } | 638 | } |
619 | 639 | ||
620 | static void *children_seq_start(struct seq_file *seq, loff_t *pos) | 640 | static void *children_seq_start(struct seq_file *seq, loff_t *pos) |