From: Andrew Morton Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton --- fs/proc/base.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) diff -puN fs/proc/base.c~proc-use-sane-permission-checks-on-the-proc-pid-fd-fix-2 fs/proc/base.c --- devel/fs/proc/base.c~proc-use-sane-permission-checks-on-the-proc-pid-fd-fix-2 2006-03-06 18:09:03.000000000 -0800 +++ devel-akpm/fs/proc/base.c 2006-03-06 18:09:06.000000000 -0800 @@ -536,7 +536,8 @@ static int proc_fd_access_allowed(struct /* For a special task simply check the capability */ allowed = capable(CAP_SYS_PTRACE); } - put_task_struct(task); + if (task) + put_task_struct(task); return allowed; } _