aboutsummaryrefslogtreecommitdiff
path: root/net
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 15:58:42 -0700
commita420c0a1ec9d34fa8923f59e12d4ad9047db490b (patch)
treed0ffd74633615119b631684971cc12d48f8dc1a6 /net
parentea374cba047ddb056ca4b4f8813282ad7642201e (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')
-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 49278f83036..27a23785a50 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);