diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2011-02-15 22:22:54 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-03-23 16:36:50 -0400 |
commit | ec6fd8a4355cda81cd9f06bebc048e83eb514ac7 (patch) | |
tree | 828c3f2e1b474cc0ec9768d5dc19cfa2c086898f /fs/proc/task_nommu.c | |
parent | ca6b0bf0e086513b9ee5efc0aa5770ecb57778af (diff) | |
download | linux-stable-ec6fd8a4355cda81cd9f06bebc048e83eb514ac7.tar.gz linux-stable-ec6fd8a4355cda81cd9f06bebc048e83eb514ac7.tar.bz2 linux-stable-ec6fd8a4355cda81cd9f06bebc048e83eb514ac7.zip |
report errors in /proc/*/*map* sanely
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/proc/task_nommu.c')
-rw-r--r-- | fs/proc/task_nommu.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c index b535d3e5d5f1..980de547c070 100644 --- a/fs/proc/task_nommu.c +++ b/fs/proc/task_nommu.c @@ -199,13 +199,13 @@ static void *m_start(struct seq_file *m, loff_t *pos) /* pin the task and mm whilst we play with them */ priv->task = get_pid_task(priv->pid, PIDTYPE_PID); if (!priv->task) - return NULL; + return ERR_PTR(-ESRCH); mm = mm_for_maps(priv->task); - if (!mm) { + if (!mm || IS_ERR(mm)) { put_task_struct(priv->task); priv->task = NULL; - return NULL; + return mm; } down_read(&mm->mmap_sem); |