diff options
Diffstat (limited to 'fs/proc/base.c')
-rw-r--r-- | fs/proc/base.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index 8173dfd89cb2..5485a5388ecb 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
@@ -654,6 +654,8 @@ static int proc_pid_permission(struct inode *inode, int mask) | |||
654 | bool has_perms; | 654 | bool has_perms; |
655 | 655 | ||
656 | task = get_proc_task(inode); | 656 | task = get_proc_task(inode); |
657 | if (!task) | ||
658 | return -ESRCH; | ||
657 | has_perms = has_pid_permissions(pid, task, 1); | 659 | has_perms = has_pid_permissions(pid, task, 1); |
658 | put_task_struct(task); | 660 | put_task_struct(task); |
659 | 661 | ||