ns proc: Return -ENOENT for a nonexistent /proc/self/ns/ entry.

Spotted-by: Nathan Lynch <ntl@pobox.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
This commit is contained in:
Eric W. Biederman 2011-05-11 15:42:08 -07:00
parent 618e724b8d
commit 62ca24baf1
1 changed files with 1 additions and 0 deletions

View File

@ -161,6 +161,7 @@ static struct dentry *proc_ns_dir_lookup(struct inode *dir,
if (!memcmp(dentry->d_name.name, (*entry)->name, len))
break;
}
error = ERR_PTR(-ENOENT);
if (entry > last)
goto out;