From: "Eric W. Biederman" The value doesn't change but this ensures I will have the proper value when other files are added to proc_base_stuff. Signed-off-by: Eric W. Biederman Cc: Oleg Nesterov Signed-off-by: Andrew Morton --- fs/proc/base.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -puN fs/proc/base.c~proc-properly-compute-tgid_offset fs/proc/base.c --- a/fs/proc/base.c~proc-properly-compute-tgid_offset +++ a/fs/proc/base.c @@ -1961,7 +1961,7 @@ retry: return task; } -#define TGID_OFFSET (FIRST_PROCESS_ENTRY + (1 /* /proc/self */)) +#define TGID_OFFSET (FIRST_PROCESS_ENTRY + (ARRAY_SIZE(proc_base_stuff) - 1)) static int proc_pid_fill_cache(struct file *filp, void *dirent, filldir_t filldir, struct task_struct *task, int tgid) _