summaryrefslogtreecommitdiff
path: root/net/sunrpc
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2010-03-21 12:10:34 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-04-01 16:01:46 -0700
commitb48cf4837f3edb4b0fa8101f4544dba37be6188f (patch)
treed3bcb86840a321961114325c1b79d716908f247f /net/sunrpc
parent33b122a45a92b8029b6e416ec0bdcce09abbde22 (diff)
sunrpc: handle allocation errors from __rpc_lookup_create()
commit f1f0abe192a72e75d7c59972e30784d043fd8d73 upstream. __rpc_lookup_create() can return ERR_PTR(-ENOMEM). Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'net/sunrpc')
-rw-r--r--net/sunrpc/rpc_pipe.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c
index 49278f830367..27a23785a50d 100644
--- a/net/sunrpc/rpc_pipe.c
+++ b/net/sunrpc/rpc_pipe.c
@@ -587,6 +587,8 @@ static struct dentry *__rpc_lookup_create_exclusive(struct dentry *parent,
struct dentry *dentry;
dentry = __rpc_lookup_create(parent, name);
+ if (IS_ERR(dentry))
+ return dentry;
if (dentry->d_inode == NULL)
return dentry;
dput(dentry);