sunrpc: handle allocation errors from __rpc_lookup_create()
Subsystems (4)
PATCH 1/1 sunrpc: handle allocation errors from __rpc_lookup_create()
__rpc_lookup_create() can return ERR_PTR(-ENOMEM).
Signed-off-by Dan Carpenter <[email protected]>
net/sunrpc/rpc_pipe.c +2 -0
@@ -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);
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 3 lines · Dan Carpenter
__rpc_lookup_create()can returnERR_PTR(-ENOMEM).Signed-off-by Dan Carpenter <[email protected]>
Well spotted. Applied!
Cheers
Trond
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html