aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/proc/array.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/proc/array.c b/fs/proc/array.c
index 88c355574aa0..525157ca25cb 100644
--- a/fs/proc/array.c
+++ b/fs/proc/array.c
@@ -62,6 +62,7 @@
62#include <linux/mman.h> 62#include <linux/mman.h>
63#include <linux/sched/mm.h> 63#include <linux/sched/mm.h>
64#include <linux/sched/numa_balancing.h> 64#include <linux/sched/numa_balancing.h>
65#include <linux/sched/task_stack.h>
65#include <linux/sched/task.h> 66#include <linux/sched/task.h>
66#include <linux/sched/cputime.h> 67#include <linux/sched/cputime.h>
67#include <linux/proc_fs.h> 68#include <linux/proc_fs.h>
@@ -421,7 +422,15 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,
421 * esp and eip are intentionally zeroed out. There is no 422 * esp and eip are intentionally zeroed out. There is no
422 * non-racy way to read them without freezing the task. 423 * non-racy way to read them without freezing the task.
423 * Programs that need reliable values can use ptrace(2). 424 * Programs that need reliable values can use ptrace(2).
425 *
426 * The only exception is if the task is core dumping because
427 * a program is not able to use ptrace(2) in that case. It is
428 * safe because the task has stopped executing permanently.
424 */ 429 */
430 if (permitted && (task->flags & PF_DUMPCORE)) {
431 eip = KSTK_EIP(task);
432 esp = KSTK_ESP(task);
433 }
425 } 434 }
426 435
427 get_task_comm(tcomm, task); 436 get_task_comm(tcomm, task);