diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-06-16 15:02:20 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-06-16 15:02:20 -0700 |
commit | 8b97b21e0f4f59801d05a5c536417f04ecfb5603 (patch) | |
tree | 47c95c95a4f93a4596dc57204176ceb432234eba /fs/proc | |
parent | 99a15e21d96f6857dafab1e5167e5e8183215c9c (diff) | |
parent | 793925334f32e9026c22baee5c3c340f47d4ef7e (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/linux-2.6-nsfd
* git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/linux-2.6-nsfd:
proc: Fix Oops on stat of /proc/<zombie pid>/ns/net
Diffstat (limited to 'fs/proc')
-rw-r--r-- | fs/proc/namespaces.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/proc/namespaces.c b/fs/proc/namespaces.c index 781dec5bd68..be177f702ac 100644 --- a/fs/proc/namespaces.c +++ b/fs/proc/namespaces.c @@ -38,18 +38,21 @@ static struct dentry *proc_ns_instantiate(struct inode *dir, struct inode *inode; struct proc_inode *ei; struct dentry *error = ERR_PTR(-ENOENT); + void *ns; inode = proc_pid_make_inode(dir->i_sb, task); if (!inode) goto out; + ns = ns_ops->get(task); + if (!ns) + goto out_iput; + ei = PROC_I(inode); inode->i_mode = S_IFREG|S_IRUSR; inode->i_fop = &ns_file_operations; ei->ns_ops = ns_ops; - ei->ns = ns_ops->get(task); - if (!ei->ns) - goto out_iput; + ei->ns = ns; dentry->d_op = &pid_dentry_operations; d_add(dentry, inode); |