X-Git-Url: http://git.cascardo.eti.br/?a=blobdiff_plain;f=fs%2Fproc%2Farray.c;h=81818adb8e9ee3cc1adfbd5d0487d427f8c1f531;hb=272ddc8b37354c3fe111ab26d25e792629148eee;hp=89600fd5963d46d5a5bd0915bde36850f7e71110;hpb=ef98988ba369da88bab8a4d457407e71bbe160fa;p=cascardo%2Flinux.git diff --git a/fs/proc/array.c b/fs/proc/array.c index 89600fd5963d..81818adb8e9e 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c @@ -412,10 +412,11 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns, mm = get_task_mm(task); if (mm) { vsize = task_vsize(mm); - if (permitted) { - eip = KSTK_EIP(task); - esp = KSTK_ESP(task); - } + /* + * esp and eip are intentionally zeroed out. There is no + * non-racy way to read them without freezing the task. + * Programs that need reliable values can use ptrace(2). + */ } get_task_comm(tcomm, task);