Skip to content

Commit

Permalink
sunrpc: handle allocation errors from __rpc_lookup_create()
Browse files Browse the repository at this point in the history
__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>
Cc: stable@kernel.org
  • Loading branch information
Dan Carpenter authored and Trond Myklebust committed Mar 22, 2010
1 parent ff0901f commit f1f0abe
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/sunrpc/rpc_pipe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f1f0abe

Please sign in to comment.