summaryrefslogtreecommitdiffstats
path: root/fs/proc
diff options
context:
space:
mode:
Diffstat (limited to 'fs/proc')
-rw-r--r--fs/proc/base.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 96ee899d650..989e3078d7a 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -350,6 +350,8 @@ static int lstats_open(struct inode *inode, struct file *file)
struct seq_file *m;
struct task_struct *task = get_proc_task(inode);
+ if (!task)
+ return -ENOENT;
ret = single_open(file, lstats_show_proc, NULL);
if (!ret) {
m = file->private_data;