diff options
Diffstat (limited to 'fs/proc/array.c')
-rw-r--r-- | fs/proc/array.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/fs/proc/array.c b/fs/proc/array.c index 77a8eacbe032..79375fc115d2 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
1 | /* | 2 | /* |
2 | * linux/fs/proc/array.c | 3 | * linux/fs/proc/array.c |
3 | * | 4 | * |
@@ -137,7 +138,7 @@ static const char * const task_state_array[] = { | |||
137 | static inline const char *get_task_state(struct task_struct *tsk) | 138 | static inline const char *get_task_state(struct task_struct *tsk) |
138 | { | 139 | { |
139 | BUILD_BUG_ON(1 + ilog2(TASK_REPORT_MAX) != ARRAY_SIZE(task_state_array)); | 140 | BUILD_BUG_ON(1 + ilog2(TASK_REPORT_MAX) != ARRAY_SIZE(task_state_array)); |
140 | return task_state_array[__get_task_state(tsk)]; | 141 | return task_state_array[task_state_index(tsk)]; |
141 | } | 142 | } |
142 | 143 | ||
143 | static inline int get_task_umask(struct task_struct *tsk) | 144 | static inline int get_task_umask(struct task_struct *tsk) |
@@ -365,6 +366,11 @@ static void task_cpus_allowed(struct seq_file *m, struct task_struct *task) | |||
365 | cpumask_pr_args(&task->cpus_allowed)); | 366 | cpumask_pr_args(&task->cpus_allowed)); |
366 | } | 367 | } |
367 | 368 | ||
369 | static inline void task_core_dumping(struct seq_file *m, struct mm_struct *mm) | ||
370 | { | ||
371 | seq_printf(m, "CoreDumping:\t%d\n", !!mm->core_state); | ||
372 | } | ||
373 | |||
368 | int proc_pid_status(struct seq_file *m, struct pid_namespace *ns, | 374 | int proc_pid_status(struct seq_file *m, struct pid_namespace *ns, |
369 | struct pid *pid, struct task_struct *task) | 375 | struct pid *pid, struct task_struct *task) |
370 | { | 376 | { |
@@ -375,6 +381,7 @@ int proc_pid_status(struct seq_file *m, struct pid_namespace *ns, | |||
375 | 381 | ||
376 | if (mm) { | 382 | if (mm) { |
377 | task_mem(m, mm); | 383 | task_mem(m, mm); |
384 | task_core_dumping(m, mm); | ||
378 | mmput(mm); | 385 | mmput(mm); |
379 | } | 386 | } |
380 | task_sig(m, task); | 387 | task_sig(m, task); |
@@ -453,7 +460,7 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns, | |||
453 | cutime = sig->cutime; | 460 | cutime = sig->cutime; |
454 | cstime = sig->cstime; | 461 | cstime = sig->cstime; |
455 | cgtime = sig->cgtime; | 462 | cgtime = sig->cgtime; |
456 | rsslim = ACCESS_ONCE(sig->rlim[RLIMIT_RSS].rlim_cur); | 463 | rsslim = READ_ONCE(sig->rlim[RLIMIT_RSS].rlim_cur); |
457 | 464 | ||
458 | /* add up live thread stats at the group level */ | 465 | /* add up live thread stats at the group level */ |
459 | if (whole) { | 466 | if (whole) { |