diff options
author | Dan Carpenter <error27@gmail.com> | 2010-03-21 12:10:34 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-04-01 16:01:46 -0700 |
commit | b48cf4837f3edb4b0fa8101f4544dba37be6188f (patch) | |
tree | d3bcb86840a321961114325c1b79d716908f247f /net | |
parent | 33b122a45a92b8029b6e416ec0bdcce09abbde22 (diff) | |
download | kernel-crypto-b48cf4837f3edb4b0fa8101f4544dba37be6188f.tar.gz kernel-crypto-b48cf4837f3edb4b0fa8101f4544dba37be6188f.tar.xz kernel-crypto-b48cf4837f3edb4b0fa8101f4544dba37be6188f.zip |
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.c | 2 |
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); |