All of lore.kernel.org
 help / color / mirror / Atom feed
* rpcauth_create() returns ERR_PTR
@ 2012-06-25 20:43 Chuck Lever
  2012-06-25 20:48 ` Bryan Schumaker
  0 siblings, 1 reply; 3+ messages in thread
From: Chuck Lever @ 2012-06-25 20:43 UTC (permalink / raw)
  To: Bryan Schumaker; +Cc: Linux NFS Mailing List

Hi-

nfs4_create_sec_client() and nfs4_lookup_root_sec() both invoke rpcauth_create().  They check to see that it returned something that wasn't NULL.

As far as I can tell, rpcauth_create() reports an error by returning something that IS_ERR.  It doesn't return NULL.  nfs_init_server_rpcclient() appears to be correct.

The fix looks simple, but since I don't have any unit tests for this area of code, I was hoping you could take it from here.

-- 
Chuck Lever
chuck[dot]lever[at]oracle[dot]com





^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: rpcauth_create() returns ERR_PTR
  2012-06-25 20:43 rpcauth_create() returns ERR_PTR Chuck Lever
@ 2012-06-25 20:48 ` Bryan Schumaker
  2012-06-25 21:56   ` Chuck Lever
  0 siblings, 1 reply; 3+ messages in thread
From: Bryan Schumaker @ 2012-06-25 20:48 UTC (permalink / raw)
  To: Chuck Lever; +Cc: Linux NFS Mailing List

On 06/25/2012 04:43 PM, Chuck Lever wrote:
> Hi-
> 
> nfs4_create_sec_client() and nfs4_lookup_root_sec() both invoke rpcauth_create().  They check to see that it returned something that wasn't NULL.
> 
> As far as I can tell, rpcauth_create() reports an error by returning something that IS_ERR.  It doesn't return NULL.  nfs_init_server_rpcclient() appears to be correct.
> 
> The fix looks simple, but since I don't have any unit tests for this area of code, I was hoping you could take it from here.
> 

Sure, I'll take a look at it.  You're right, checking for an error code instead of NULL sounds like an easy fix.

- Bryan


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: rpcauth_create() returns ERR_PTR
  2012-06-25 20:48 ` Bryan Schumaker
@ 2012-06-25 21:56   ` Chuck Lever
  0 siblings, 0 replies; 3+ messages in thread
From: Chuck Lever @ 2012-06-25 21:56 UTC (permalink / raw)
  To: Bryan Schumaker; +Cc: Linux NFS Mailing List


On Jun 25, 2012, at 4:48 PM, Bryan Schumaker wrote:

> On 06/25/2012 04:43 PM, Chuck Lever wrote:
>> Hi-
>> 
>> nfs4_create_sec_client() and nfs4_lookup_root_sec() both invoke rpcauth_create().  They check to see that it returned something that wasn't NULL.
>> 
>> As far as I can tell, rpcauth_create() reports an error by returning something that IS_ERR.  It doesn't return NULL.  nfs_init_server_rpcclient() appears to be correct.
>> 
>> The fix looks simple, but since I don't have any unit tests for this area of code, I was hoping you could take it from here.
>> 
> 
> Sure, I'll take a look at it.  You're right, checking for an error code instead of NULL sounds like an easy fix.

I'm trying to call rpcauth_create() in a loop, as your code does, and the call is failing with -EEXIST on the GSS flavors.  If you just check rpcauth_create's return code for NULL, you will miss this and think the call succeeded.

gss_pipes_dentries_create_net() doesn't seem to like being called twice.

-- 
Chuck Lever
chuck[dot]lever[at]oracle[dot]com





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-06-25 21:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-25 20:43 rpcauth_create() returns ERR_PTR Chuck Lever
2012-06-25 20:48 ` Bryan Schumaker
2012-06-25 21:56   ` Chuck Lever

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.