diff options
author | 2010-08-04 16:27:45 +0000 | |
---|---|---|
committer | 2010-08-30 10:35:28 -0500 | |
commit | 8f587df479c3cea14ba1a9b9d58f34fd2fd6d58b (patch) | |
tree | 5c01cd8b1fa9ecea9af268890d39a49b017a8631 | |
parent | Linux 2.6.36-rc3 (diff) | |
download | linux-8f587df479c3cea14ba1a9b9d58f34fd2fd6d58b.tar.gz linux-8f587df479c3cea14ba1a9b9d58f34fd2fd6d58b.tar.bz2 linux-8f587df479c3cea14ba1a9b9d58f34fd2fd6d58b.zip |
9p: potential ERR_PTR() dereference
p9_client_walk() can return error values if we run out of space or there
is a problem with the network.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
-rw-r--r-- | fs/9p/fid.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/9p/fid.c b/fs/9p/fid.c index 358563689064..6406f896bf95 100644 --- a/fs/9p/fid.c +++ b/fs/9p/fid.c @@ -242,7 +242,8 @@ struct p9_fid *v9fs_fid_lookup(struct dentry *dentry) } kfree(wnames); fid_out: - v9fs_fid_add(dentry, fid); + if (!IS_ERR(fid)) + v9fs_fid_add(dentry, fid); err_out: up_read(&v9ses->rename_sem); return fid; |