nfsd4: fix null dereference creating nfsv4 callback client
authorJ. Bruce Fields <bfields@citi.umich.edu>
Tue, 15 Sep 2009 16:22:42 +0000 (12:22 -0400)
committerJ. Bruce Fields <bfields@citi.umich.edu>
Wed, 16 Sep 2009 00:49:33 +0000 (20:49 -0400)
On setting up the callback to the client, we attempt to use the same
authentication flavor the client did.  We find an rpc cred to use by
calling rpcauth_lookup_credcache(), which assumes that the given
authentication flavor has a credentials cache.  However, this is not
required to be true--in particular, auth_null does not use one.
Instead, we should call the auth's lookup_cred() method.

Without this, a client attempting to mount using nfsv4 and auth_null
triggers a null dereference.

Cc: stable@kernel.org
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>

No differences found